c++ - Why can constexpr not apply to constructors? -


Why can not be postponed for constructs?

The following code can not be compiled with VC ++ 2013 CTP.

struct A {constexpr (A): _n (5) {} int _n; }; Constexpr (AF) {return A (); } Int main () {auto a = f (); } Error C3757: 'A': is not allowed for type 'constexpr' function

VC 2013 does not yet support all C ++ 11 features.


Comments