http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48015
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ICE: unexpected expression |[4.6 Regression] [C++0x] |'std::min' of kind overload |ICE: unexpected expression | |'std::min' of kind overload --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-07 15:16:10 UTC --- reduced form below shows it's a regression since 4.5, only an ICE with C++0x - appears to be due to C++0x constexpr support namespace std { template<typename T> T min(const T& l, const T& r) { return l < r ? l : r; } } using namespace std; int f(); void g(const int&); template <typename T> static void call_operator ( ) { int const a = f(); int const b = f(); int const c = min (a, b); g (c - 0); // ICE }