mirror of
https://github.com/gflags/gflags.git
synced 2025-04-07 22:40:52 +00:00
fix: No extern template declaration for MSVC <12.0
This commit is contained in:
parent
82456f220f
commit
754d3329a6
2 changed files with 9 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -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 {
|
||||||
};
|
};
|
||||||
|
|
||||||
// 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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue