[Bug libstdc++/82470] Structured bindings don't work with std::tuple if a type has a get member function

morwenn29 at hotmail dot fr gcc-bugzilla@gcc.gnu.org
Sun Oct 8 20:49:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82470

--- Comment #2 from Morwenn <morwenn29 at hotmail dot fr> ---
Shouldn't it? My reading of the standard (at least from Tim Song's online
version) is that the lookup for a get member function is intended. Here is the
relevant excerpt from [dcl.struct.bind]:

> The unqualified-id get is looked up in the scope of E by class member access lookup, and if that finds at least one declaration, the initializer is e.get<i>().
Otherwise, the initializer is get<i>(e), where get is looked up in the
associated namespaces.

https://timsong-cpp.github.io/cppwp/dcl.struct.bind


More information about the Gcc-bugs mailing list