Skip to content

Commit

Permalink
fix MSVC problem with template class instantiation
Browse files Browse the repository at this point in the history
 - error C2252 informs that the microsoft compiler wants template
   classes to be instantiated at namespace scope
  • Loading branch information
josch committed Sep 22, 2015
1 parent 5881186 commit 85b8038
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions include/GL/glui.h
Original file line number Diff line number Diff line change
Expand Up @@ -1694,19 +1694,19 @@ class GLUIAPI GLUI_EditText : public GLUI_Control
/* */
/************************************************************/

#ifdef _MSC_VER
// Explicit template instantiation needed for dll
template class GLUIAPI std::allocator<GLUI_String>;
template class GLUIAPI std::vector<GLUI_String, std::allocator<GLUI_String> >;
#endif

class GLUIAPI GLUI_CommandLine : public GLUI_EditText
{
public:
typedef GLUI_EditText Super;

enum { HIST_SIZE = 100 };

#ifdef _MSC_VER
// Explicit template instantiation needed for dll
template class GLUIAPI std::allocator<GLUI_String>;
template class GLUIAPI std::vector<GLUI_String, std::allocator<GLUI_String> >;
#endif

std::vector<GLUI_String> hist_list;
int curr_hist;
int oldest_hist;
Expand Down

0 comments on commit 85b8038

Please sign in to comment.