https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80805

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-05-17
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, 4.9.x rejects the code:

pr80805.cpp: In instantiation of ‘g()::<lambda()> [with D = int; X = <type
error>]’:
pr80805.cpp:12:6:   required from ‘struct g() [with D = int]::<lambda()>’
pr80805.cpp:16:7:   required from ‘void g() [with D = int]’
pr80805.cpp:18:21:   required from here
pr80805.cpp:15:18: error: the value of ‘H’ is not usable in a constant
expression
         return X{};
                  ^
pr80805.cpp:10:27: note: ‘H’ used in its own initializer
     constexpr static bool H = P<D>::value;
                           ^
pr80805.cpp:15:18: note: in template argument for type ‘bool’ 
         return X{};
                  ^

Reply via email to