summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/constexpr-eh-spec.C
blob: 6d231fafadbcd1210d9c1b3cf31e59dcb05ecfe4 (plain)
1
2
3
4
5
6
7
8
9
// { dg-options -std=c++0x }
template<class T> class my_limits {
public:
  static constexpr T min() throw() { return T(); }
  static constexpr T max() noexcept { return T(); }
};

constexpr double var_min = my_limits<double>::min(); // #1  OK
constexpr double var_max = my_limits<double>::max(); // #2 Error