Contrary to MSVC, MinGW compilers wants the dllexport attribute on the declaration of an explicit template instantiation, not on the definition.
GCC has always handled these attributes this way, and Clang is being made to match in D61118.
This is one of the parts necessary for building libc++ as a DLL on MinGW without forcibly exporting all symbols using --export-all-symbols. (In addition to this, another few tweaks to clang are needed.)