https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99076
Bug ID: 99076 Summary: Unclear error message when trailing angle bracket is missing Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: bugzi...@poradnik-webmastera.com Target Milestone: --- [code] #include <memory> #include <map> template< typename Key, typename T, typename Compare = std::less<Key>, typename Allocator = std::allocator<std::pair<const Key, T>> > using SecureMemMap = std::map<Key, T, Compare, std::allocator<std::pair<const Key, T>>; [/code] When this is compiled using g++, it gives following error message: [out] <source>:9:53: error: template argument 4 is invalid 9 | using SecureMemMap = std::map<Key, T, Compare, std::allocator<std::pair<const Key, T>>; | [/out] Above message is not very helpful, it is hard to tell what is wrong here. clang++ does better job here. Please improve g++ message in a similar way: [out] <source>:9:87: error: expected '>' using SecureMemMap = std::map<Key, T, Compare, std::allocator<std::pair<const Key, T>>; ^ <source>:9:30: note: to match this '<' using SecureMemMap = std::map<Key, T, Compare, std::allocator<std::pair<const Key, T>>; ^ [/out]