1// PR c++/24275 2 3template <bool val> struct bool_var { 4 static const bool value = val; 5}; 6namespace is_inc_ { 7 struct any { 8 template <class T> any(T const&); 9 }; 10 int operator++(any const&); 11 template <class T> struct impl { 12 static T &x; 13 static const bool value = sizeof(++x) == 1; 14 }; 15} 16template<typename T> struct is_incr : bool_var< is_inc_::impl<T>::value> {}; 17struct not_incr{}; 18typedef int sa1[ is_incr<not_incr>::value ? -1 : 1]; 19