On Mar 5, 2015, at 4:28 PM, Louis Dionne
wrote: The downside is that `decltype(tuple_t
)` is an unspecified dependent type that only _inherits_ `_tuple `. I'm playing with fire, I know . I read the process of ADL very carefully when I thought about this, but it is also possible that I'm exploiting a Clang bug. What do you think?
Hmm, I think that really might be relying on a clang bug, but I don't have the standard in front of me right now. From my understanding, if you inherit from _tuple
, then "T..." again needs to be considered for the list of associated namespaces. I just checked on GCC and MSVC (online compilers) and it works too. If you want to check for yourself, I wrote a gist at [1] that is a self-contained test. Actually, I would appreciate if someone with access to more exotic compilers (Intel for example) could try compiling it just to make sure.
I can verify that the linked gist compiles and runs successfully on the latest Intel C++ compiler. [jasonr@dirac:~/Downloads]$ icpc --version icpc (ICC) 15.0.1 20141022 Copyright (C) 1985-2014 Intel Corporation. All rights reserved. Jason