From 85b8038d9dbe415b327480d6bffd008a0e79c382 Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Tue, 22 Sep 2015 17:41:44 +0200 Subject: [PATCH] fix MSVC problem with template class instantiation - error C2252 informs that the microsoft compiler wants template classes to be instantiated at namespace scope --- include/GL/glui.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/GL/glui.h b/include/GL/glui.h index 07758b1..5c15080 100644 --- a/include/GL/glui.h +++ b/include/GL/glui.h @@ -1694,6 +1694,12 @@ class GLUIAPI GLUI_EditText : public GLUI_Control /* */ /************************************************************/ +#ifdef _MSC_VER +// Explicit template instantiation needed for dll +template class GLUIAPI std::allocator; +template class GLUIAPI std::vector >; +#endif + class GLUIAPI GLUI_CommandLine : public GLUI_EditText { public: @@ -1701,12 +1707,6 @@ class GLUIAPI GLUI_CommandLine : public GLUI_EditText enum { HIST_SIZE = 100 }; - #ifdef _MSC_VER - // Explicit template instantiation needed for dll - template class GLUIAPI std::allocator; - template class GLUIAPI std::vector >; - #endif - std::vector hist_list; int curr_hist; int oldest_hist;