summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept2.C
blob: 95a1443fa2820e0ba3fab0958565a7470eed7872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-options -std=c++0x }

template<class T>
constexpr T value(T t) { return t; }

template<class T>
struct is_funny {
  static constexpr bool value = false;
};

template<class T>
void eval() noexcept(value(is_funny<T>::value)) {}

constexpr bool ok = noexcept(eval<int>()); // line 12