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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-07-02
     Ever confirmed|0                           |1

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Maybe related:

template<typename T> constexpr bool truth(const T&) { return true; }

template<typename T>
void test()
{
  int i[1];
  constexpr bool untrue = !truth(i);
  static_assert(!untrue, "");
}

ce.cc: In function ‘void test()’:
ce.cc:8:3: error: non-constant condition for static assertion
   static_assert(!untrue, "");
   ^
ce.cc:8:3: error: the value of ‘untrue’ is not usable in a constant expression
ce.cc:7:18: note: ‘untrue’ used in its own initializer
   constexpr bool untrue = !truth(i);
                  ^

Reply via email to