8 Sep
2014
8 Sep
'14
8:23 a.m.
2014-09-08 6:50 GMT+02:00 Lorenzo Caminiti
2. Why is not possible to use template variables for data members?
For example, this does not compile on clang 3.4.2 saying the member is declared as a template (implying that is illegal).
struct x { template< typename T > T m; };
I am sure this is just the way C++14 template variables are supposed to work by spec, but at first glance I do not understand the reason for these "limitations".
What would be the size of this struct?