typedef decltype(true ? (long&&)0 : (long&&)0) T;
What should be T?
According to gcc (4.7), it long. According to clang (torso), this long&&. This difference causes clang not to compile code that uses gcc 4.7 libstdc ++. Who is right?
UPDATE . As ildjarn points out , Clang is right, and as Richard Smith points out, the libstdC ++ error is caused by the error in the Standard. Here is the corresponding GCC bug and the corresponding bug report .
source
share