I have following class:
How should I write a cast-to-reference-to-array operator for this class so that following works:
Code:
template <size_t size>
class Araye{
public:
Araye(int input[]){
for (int i=0;i<size;i++)
araye[i]=input[i];
}
int araye[size];
};
Code:
int adad[3]={1,2,3};
Araye<3> araye(adad);
int (&reference)[3]=araye;