Skip to content

Commit 5721ccb

Browse files
Francois Keithunknown
authored andcommitted
[Win32] Remove template specialization declaratn, export symbols.
1 parent efe8b0a commit 5721ccb

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

include/dynamic-graph/value.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,14 @@ namespace dynamicgraph {
109109
};
110110

111111
/* ---- HELPER ---------------------------------------------------------- */
112+
// Note: to ensure the WIN32 compatibility, it is necessary to export
113+
// the template specialization. Also, it is forbidden to do the template
114+
// specialization declaration in the header file, for the same reason.
112115
template< typename T >
113-
struct ValueHelper
116+
struct DYNAMIC_GRAPH_DLLAPI ValueHelper
114117
{
115118
static const Value::Type TypeID;
116119
};
117-
118-
template<> const Value::Type ValueHelper<bool>::TypeID;
119-
template<> const Value::Type ValueHelper<unsigned>::TypeID;
120-
template<> const Value::Type ValueHelper<int>::TypeID;
121-
template<> const Value::Type ValueHelper<float>::TypeID;
122-
template<> const Value::Type ValueHelper<double>::TypeID;
123-
template<> const Value::Type ValueHelper<std::string>::TypeID;
124-
template<> const Value::Type ValueHelper<Vector>::TypeID;
125-
template<> const Value::Type ValueHelper<Matrix>::TypeID;
126-
127120
} // namespace command
128121
} //namespace dynamicgraph
129122

0 commit comments

Comments
 (0)