summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept2.C
blob: d10039a92e131d7509c060f32c7a55aa18565834 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// { dg-do compile { target c++11 } }

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