Is is_constexpr possible in C++11?
I once wrote it (EDIT: see below for limitations and explanations). From https://stackoverflow.com/a/10287598/34509 : template<typename T> constexpr typename remove_reference<T>::type makeprval(T && t) { return t; } #define isprvalconstexpr(e) noexcept(makeprval(e)) However there are many kinds of constant expressions. The above answer detects prvalue constant expressions. Explanation The noexcept(e) expression gives false iff e contains a potentially … Read more