diff --git a/include/__config b/include/__config index 600f0fbed..e001215b8 100644 --- a/include/__config +++ b/include/__config @@ -649,7 +649,7 @@ template struct __static_assert_check {}; #endif #ifndef _LIBCPP_EXTERN_TEMPLATE -#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; +#define _LIBCPP_EXTERN_TEMPLATE(...) #endif #ifndef _LIBCPP_EXTERN_TEMPLATE2 diff --git a/src/algorithm.cpp b/src/algorithm.cpp index e548856ff..de185c2b2 100644 --- a/src/algorithm.cpp +++ b/src/algorithm.cpp @@ -7,6 +7,8 @@ // //===----------------------------------------------------------------------===// +#undef _LIBCPP_EXTERN_TEMPLATE +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; #include "algorithm" #include "random" #include "mutex" diff --git a/src/ios.cpp b/src/ios.cpp index 90972c407..e2e0363fa 100644 --- a/src/ios.cpp +++ b/src/ios.cpp @@ -9,6 +9,9 @@ #include "__config" +#undef _LIBCPP_EXTERN_TEMPLATE +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; + #include "ios" #include diff --git a/src/locale.cpp b/src/locale.cpp index bdc73e1d5..d2450e7be 100644 --- a/src/locale.cpp +++ b/src/locale.cpp @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +#undef _LIBCPP_EXTERN_TEMPLATE +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; + // On Solaris, we need to define something to make the C99 parts of localeconv // visible. #ifdef __sun__ diff --git a/src/string.cpp b/src/string.cpp index d3f29df63..a00ed8b5f 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +#undef _LIBCPP_EXTERN_TEMPLATE +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; + #include "string" #include "cstdlib" #include "cwchar" diff --git a/src/valarray.cpp b/src/valarray.cpp index 2d8db52ac..f6745dff4 100644 --- a/src/valarray.cpp +++ b/src/valarray.cpp @@ -7,6 +7,9 @@ // //===----------------------------------------------------------------------===// +#undef _LIBCPP_EXTERN_TEMPLATE +#define _LIBCPP_EXTERN_TEMPLATE(...) extern template __VA_ARGS__; + #include "valarray" _LIBCPP_BEGIN_NAMESPACE_STD