Boost logo

Boost :

Subject: Re: [boost] [static_if] Is there interest in a `static if` emulation library?
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2014-09-08 04:23:08


2014-09-08 6:50 GMT+02:00 Lorenzo Caminiti <lorcaminiti_at_[hidden]>:

>
>
> 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?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk