Add workaround to std::variant for Clang bug 31852

Jonathan Wakely
Mon Mar 26 13:13:00 GMT 2018

This makes it possible to use our std::variant with Clang, as well as
some minor tweaks to avoid ADL (so the compiler doesn't waste time
looking in associated namespaces) and adjust whitespace.

       * include/std/variant (__get): Qualify calls to avoid ADL.
       (__select_index): Adjust whitespace.
       (variant): Add using-declaration to workaround Clang bug.

Tested powerpc64le-linux, committed to trunk.. I'll backport to
gcc-7-branch too.

More information about the Gcc-patches mailing list