Please consider the following code snippet:
template
class vector
{
public:
typename Tuple::size_type size() const noexcept(noexcept(m_ele
Clang is correct here, this is gcc bug 52869. According to [basic.scope.class], emphasis mine:
The potential scope of a name declared in a class consists not only of the declarative region following the name’s point of declaration, but also of all function bodies, default arguments, exception-specifications, and brace-or-equal-initializers of non-static data members in that class (including such things in nested classes).
The scope of m_elements
includes the noexcept-specification for size()
.