It seems that the problem is with debug and auto symbols.
I have an auto function in a class:
#include <cstddef> template <typename T> struct binary_expr { auto operator()(std::size_t i){ return 1; } }; int main(){ binary_expr<double> b; return 0; }
When I compile with g ++ (4.8.2) and -g, I have this error:
g++ -g -std=c++1y auto.cpp auto.cpp: In instantiation of 'struct binary_expr<double>': auto.cpp:11:25: required from here auto.cpp:4:8: internal compiler error: in gen_type_die_with_usage, at dwarf2out.c:19484 struct binary_expr { ^ Please submit a full bug report, with preprocessed source if appropriate. See <https:
With clang ++ (3.4) and -g, I have this:
clang++ -g -std=c++1y auto.cpp error: debug information for auto is not yet supported 1 error generated.
If I remove -g or set the type explicitly, it works fine.
Is clang ++ supposedly part of C ++ 14?
Is there a workaround for these restrictions or am I screwed up?
c ++ gcc c ++ 11 clang c ++ 14
Baptiste wicht
source share