https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86138
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Christian Franke from comment #0) > As a consequence, no C++17 compatible code for this getline() is generated > and the old getline() from cygstdc++-6.dll is called instead. Why is the one in the DLL not compatible? The extern templates are disabled because std::basic_string has additional member functions in C++17 mode, and they're not instantiated in the library. By disabling the explicit instantiation declarations the compiler will emit definitions for the C++17-only member functions. But there's nothing wrong with the getline instantiation in the DLL, it's identical to what would be defined for C++17. > AFAICS the above still holds for current SVN trunk release 261563. > > For a testcase and a proposed patch see: > https://cygwin.com/ml/cygwin/2018-06/msg00125.html As requested at https://gcc.gnu.org/bugs testcases need to be provided here, not as URLs.