#921: better comment, provide workaround for MSVC only

This commit is contained in:
Guenter Obiltschnig 2015-09-01 21:46:18 +02:00
parent 22c7933fe5
commit 249c064ec7
3 changed files with 18 additions and 6 deletions

View File

@ -165,9 +165,13 @@ private:
//
// We provide an instantiation for char
// We provide an instantiation for char.
//
#if defined(_WIN32) && defined(POCO_DLL) && !defined(Foundation_EXPORTS) // See #921
// Visual C++ needs a workaround - explicitly importing the template
// instantiation - to avoid duplicate symbols due to multiple
// instantiations in different libraries.
//
#if defined(_MSC_VER) && defined(POCO_DLL) && !defined(Foundation_EXPORTS)
template class Foundation_API BasicBufferedBidirectionalStreamBuf<char, std::char_traits<char> >;
#endif
typedef BasicBufferedBidirectionalStreamBuf<char, std::char_traits<char> > BufferedBidirectionalStreamBuf;

View File

@ -157,9 +157,13 @@ private:
//
// We provide an instantiation for char
// We provide an instantiation for char.
//
#if defined(_WIN32) && defined(POCO_DLL) && !defined(Foundation_EXPORTS) // See #921
// Visual C++ needs a workaround - explicitly importing the template
// instantiation - to avoid duplicate symbols due to multiple
// instantiations in different libraries.
//
#if defined(_MSC_VER) && defined(POCO_DLL) && !defined(Foundation_EXPORTS)
template class Foundation_API BasicBufferedStreamBuf<char, std::char_traits<char> >;
#endif
typedef BasicBufferedStreamBuf<char, std::char_traits<char> > BufferedStreamBuf;

View File

@ -163,9 +163,13 @@ private:
//
// We provide an instantiation for char
// We provide an instantiation for char.
//
#if defined(_WIN32) && defined(POCO_DLL) && !defined(Foundation_EXPORTS) // See #921
// Visual C++ needs a workaround - explicitly importing the template
// instantiation - to avoid duplicate symbols due to multiple
// instantiations in different libraries.
//
#if defined(_MSC_VER) && defined(POCO_DLL) && !defined(Foundation_EXPORTS)
template class Foundation_API BasicUnbufferedStreamBuf<char, std::char_traits<char> >;
#endif
typedef BasicUnbufferedStreamBuf<char, std::char_traits<char> > UnbufferedStreamBuf;