Commit 754d3329 authored by Andreas Schuh's avatar Andreas Schuh Committed by Andreas Schuh

fix: No extern template declaration for MSVC <12.0

parent 82456f22
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
/build/ /build/
/builds/ /builds/
/build-*/ /build-*/
/_build/
.DS_Store .DS_Store
CMakeCache.txt CMakeCache.txt
DartConfiguration.tcl DartConfiguration.tcl
......
...@@ -442,10 +442,14 @@ class GFLAGS_DLL_DECL FlagRegisterer { ...@@ -442,10 +442,14 @@ class GFLAGS_DLL_DECL FlagRegisterer {
}; };
// Force compiler to not generate code for the given template specialization. // Force compiler to not generate code for the given template specialization.
#define GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(type) \ #if defined(_MSC_VER) && _MSC_VER < 1800 // Visual Studio 2013 version 12.0
extern template GFLAGS_DLL_DECL FlagRegisterer::FlagRegisterer( \ #define GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(type)
const char* name, const char* help, const char* filename, \ #else
type* current_storage, type* defvalue_storage) #define GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(type) \
extern template GFLAGS_DLL_DECL FlagRegisterer::FlagRegisterer( \
const char* name, const char* help, const char* filename, \
type* current_storage, type* defvalue_storage)
#endif
// Do this for all supported flag types. // Do this for all supported flag types.
GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(bool); GFLAGS_DECLARE_FLAG_REGISTERER_CTOR(bool);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment