test.cc: #include <string> template <class T> class foo { public: std::basic_string<T> bar() { return ""; } }; foo<char> baz; auto y = baz.bar(); Compiler command: g++-5 -c -std=c++14 test.cc -o test.o Result: nm test.o |c++filt| grep bar 0000000000000000 W foo<char>::bar() Expected: nm test.o |c++filt| grep bar 0000000000000000 W foo<char>::bar[abi:cxx11]()
I think this is a known issue and intentionally not fixed on the GCC 5 branch (but it is fixed for GCC 6). N.B. GNU nm has a -C option to demangle so you don't need c++filt.
Fixed.