This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Curious issue with char_traits
Paolo Carlini wrote:
>>I don't have g++4 now to check, but g++ is (was?) the only compiler in
>>existence where non-function names are found by ADL and cause errors.
>>
>>
>If this is really still true (I'm going to check) we have to fix the
>compiler first, it's crazy!
>
>
Ahhhhhhhhrrrrrrrrrrrrrrggggggggggggggghhhhhhhhh!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
This doesn't compile:
namespace __gnu_cxx
{
struct char_traits { };
struct slist { };
}
template<typename T>
void slist(T) { }
int main()
{
slist(__gnu_cxx::char_traits());
}
Ahhhhhhhrrrrrrrrrrrrrrrrrrgggggggggggggggggghhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!!!!!!!!
Paolo.