https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67632
Matt Godbolt <matt at godbolt dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |matt at godbolt dot org --- Comment #11 from Matt Godbolt <matt at godbolt dot org> --- I was unable to reproduce with gcc 7.2 ~ $ cat > /tmp/t.cc #include <unordered_map> template class std::unordered_map<int, int>; ~ $ cat > /tmp/x.cc #include <unordered_map> extern template class std::unordered_map<int, int>; std::unordered_map<int, int> copy( const std::unordered_map<int, int> & a) { return a; } main() {} $ ~/dev/cpp-build-tools/g++ --version g++ ('DRW) 7.2.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++ -std=c++11 -c t.cc $ g++ -std=c++11 t.o x.cc $ ./a.out $