Compiling net_udp.cpp with clang-3.4 crashes the compiler when parsing a decltype that refers into the class currently being compiled. Parsing a decltype that refers to a parent class works. Rearrange the decltype usage to avoid referencing the current class. This makes the code harder to read and less flexible, but prevents clang from crashing. Clang self trace: 1. <eof> parser at end of file 2. similar/main/net_udp.cpp:317:8: instantiating function definition 'operator()' 3. similar/main/net_udp.cpp:317:8: LLVM IR generation of declaration '(anonymous namespace)::sockaddr_dispatch_t<(anonymous namespace)::dxx_recvfrom_t>::operator()' 4. similar/main/net_udp.cpp:317:8: Mangling declaration '(anonymous namespace)::sockaddr_dispatch_t<(anonymous namespace)::dxx_recvfrom_t>::operator()' [Update: also affects OS X clang v6, as reported by btb: https://github.com/dxx-rebirth/dxx-rebirth/pull/35#issuecomment-73350066] |
||
---|---|---|
.. | ||
2d | ||
3d | ||
arch | ||
editor | ||
main | ||
mem | ||
misc |