diff --git a/test/boost_no_constexpr.ipp b/test/boost_no_constexpr.ipp index 35ac4891..1f3a96ee 100644 --- a/test/boost_no_constexpr.ipp +++ b/test/boost_no_constexpr.ipp @@ -32,13 +32,7 @@ private: template struct X { }; - -#if __cplusplus < 201400L -// Some C++14 compilers reject this (clang), some C++11 compilers reject "constexpr const" (GCC-4.6) -constexpr A a = 42; -#else constexpr const A a = 42; -#endif X xx; // OK: unique conversion to int @@ -68,9 +62,18 @@ struct F : virtual E }; constexpr F& f(F& out) { return out; } +namespace whatever{}; + +constexpr int factorial(int i) +{ + typedef int value_type; + using namespace whatever; + return i <= 1 ? 1 : i * factorial(value_type(i-1)); +} + int test() { - int i = square(5); + constexpr int i = square(5) + factorial(10); quiet_warning(i); switch (i)