msvc on windows breaks with singleton declared but gcc needs default visibility to avoid double singleton registration across dlls when using -fvisiblity=hidden

This commit is contained in:
Dane Springmeyer 2013-05-17 13:16:36 -07:00
parent 2393453765
commit 03d8b6d9d7

View file

@ -94,9 +94,16 @@ public:
}
};
#ifdef __GNUC__
template <typename T,
template <typename U> class CreatePolicy=CreateStatic> class MAPNIK_EXP singleton
template <typename U> class CreatePolicy=CreateStatic> class MAPNIK_DECL singleton
{
#else
template <typename T,
template <typename U> class CreatePolicy=CreateStatic> class singleton
{
#endif
#ifdef __SUNPRO_CC
/* Sun's C++ compiler will issue the following errors if CreatePolicy<T> is used:
Error: A class template name was expected instead of mapnik::CreatePolicy<mapnik::T>