Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22113

gcc compiler flag to suppress template expansion for template errors during compilation?

$
0
0

I'm wondering if there is a flag or modification for the gcc compiler that will return a line number and sentence explaining the type of error when it encounters an error involving templates, but will not print the page of template expansion code spaghetti that invariably follow such errors.

For example, instead of an error like this:

temp.cc:9: error: ‘class std::map<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char,     std::char_traits<char>, std::allocator<char> > > > >’ has no member named ‘hat’

I would like something like this:

temp.cc:9: error: class has no member named hat.

Viewing all articles
Browse latest Browse all 22113

Trending Articles