http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54859
Bug #: 54859 Summary: constexpr in template aliase rejected as non-constant Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: leo...@volnitsky.com clang-3.2 and gcc-4.7.2 compiles, gcc-4.8 rejects: -------------------------------------------------------------------------- // enbale_if template <bool B, class T = void> struct enable_if { typedef T type; }; template <class T> struct enable_if<false, T> {}; // template alias template<bool Cnd, class T=void> using eIF = typename enable_if <Cnd,T>::type; // f - this compiles template<bool B=true> typename enable_if<!B, int>::type f() { return 20; } // ff - error: integral expression ‘! B’ is not constant template<bool B=true> eIF<!B, int> ff() { return 20; } int main() {} --------------------------------------------------------------------------- This seams to be related to bug 54648, where I found bad commit to be 191412