http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49520
Summary: [C++0x] using-declaration and operator&& confuses constexpr Product: gcc Version: 4.7.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: r...@gcc.gnu.org CC: ja...@gcc.gnu.org namespace x { void foo(); } template<typename T> struct traits { static constexpr bool f() { return true; } static constexpr bool g() { using x::foo; return f() && noexcept(foo()); } }; template struct traits<int>; constexpr.cc: In static member function 'static constexpr bool traits<T>::g() [with T = int]': constexpr.cc:15:17: required from here constexpr.cc:12:5: error: body of constexpr function 'static constexpr bool traits<T>::g() [with T = int]' not a return-statement (I'm trying to use something of this form to make vector's move-assignment operator noexcept when using std::allocator, an important QoI issue. 'f' is propagate_on_container_move_assignment and 'x::foo' is 'std::swap' which needs to be called unqualified.)