<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/60820>60820</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-cl does not accept declspec property with a multidimensional array
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
tiagomacarios
</td>
</tr>
</table>
<pre>
clang-cl compiles this fine:
https://godbolt.org/z/TMc5T9K5Y
```
struct S;
class X {
public:
S __declspec(property(get = get_value, put = set_value)) value[];
const S& get_value(int index);
void set_value(int index, const S&);
};
void f1(X& x, int index, const S& s)
{
x.value[1] = s;
}
const S& f2(X& x, int index)
{
return x.value[index];
}
```
but it fails to compile if the property is multidimensional
https://godbolt.org/z/aeYW5xaE1
```
struct S;
class X {
public:
S __declspec(property(get = get_value)) value[][];
const S& get_value(int index1, int index2);
};
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEVE1vozwQ_jXmMmpkhgDhwKFtXi6v9tRK254qYxvwymBkD_3YX7-CJA1pt1JvK0UOHs88z3w8GhGCaQetS5besHQfiYk650syonW9kMIbF6LaqbdSWjG0V9KCdP1orA5AnQnQmEGz5JrxPePXHdEY5htWDKvWqdpZ2jjfMqx-M6zuf8j0vvg_fTy4s4wff8s1kJ8kwR1Lbo7vyymtCAEegOVHMwCMU22NfOcFALiDpyelpQ2jlgx3o3ej9vTGcNdqApbsodX09CzspBnewjgdjOFsLBgWcPhemvGexwwv3RDm3DBb4-zMQGAGpV_n8LX_szNqDb72vF2hreNYvv9Q-4LSxAx3DzPzEvsFEIQZ6oizSuR1cyopZun-UPMF47rVZ7QGvyL9G4nXNPlhxXXwXfXwzHQ59MNZTwSGoBHGBiB30hiYBqjTcBommAD9ZMko0-shGDcI-z3lCf34M30V_8X_WnmfRHYpte8LLr4YC36po8tKI1UmqkgKEekyzvIszXnMk6grm6xWmG6TJOUqK9SWFwlXdYaCK-SoVWRK5JhwjLM4T1OebLgWu0YmSmG-lTHmbMt1L4zdWPvcz62PTAiTLjO-Qx5ZUWsbljWDOOgXWB4Z4rx1fDnHXNVTG9iWWxMonFHIkNXn9aOcDjA4AiGlHglOnT-L5MVQB-KTUEB4L96iydvyg1oMdVO9ka5nWM20x7-r0btfWhLDakk2MKyWYv4EAAD__0neh0k">