view gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

// FIXME this is currently invalid, but seems like it should be OK
// { dg-do compile { target c++11 } }

struct A { A() { } };

template<class T>
constexpr bool ignore(T&&) { return true; }

static_assert(ignore(10), "Error"); // OK

A s;

static_assert(ignore(s), "Error"); // Currently an error