Skip to content

Commit e30bf72

Browse files
committed
Move definition of template instatiation to cpp
1 parent 4bf3ca5 commit e30bf72

File tree

2 files changed

+17
-8
lines changed

2 files changed

+17
-8
lines changed

include/dynamic-graph/value.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@ namespace dynamicgraph {
115115
static const Value::Type TypeID;
116116
};
117117

118-
template<> const Value::Type ValueHelper<bool>::TypeID = Value::BOOL;
119-
template<> const Value::Type ValueHelper<unsigned>::TypeID = Value::UNSIGNED;
120-
template<> const Value::Type ValueHelper<int>::TypeID = Value::INT;
121-
template<> const Value::Type ValueHelper<float>::TypeID = Value::FLOAT;
122-
template<> const Value::Type ValueHelper<double>::TypeID = Value::DOUBLE;
123-
template<> const Value::Type ValueHelper<std::string>::TypeID = Value::STRING;
124-
template<> const Value::Type ValueHelper<Vector>::TypeID = Value::VECTOR;
125-
template<> const Value::Type ValueHelper<Matrix>::TypeID = Value::MATRIX;
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;
126126

127127
} // namespace command
128128
} //namespace dynamicgraph

src/command/value.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,5 +330,14 @@ namespace dynamicgraph {
330330
return os;
331331
}
332332

333+
template<> const Value::Type ValueHelper<bool>::TypeID = Value::BOOL;
334+
template<> const Value::Type ValueHelper<unsigned>::TypeID = Value::UNSIGNED;
335+
template<> const Value::Type ValueHelper<int>::TypeID = Value::INT;
336+
template<> const Value::Type ValueHelper<float>::TypeID = Value::FLOAT;
337+
template<> const Value::Type ValueHelper<double>::TypeID = Value::DOUBLE;
338+
template<> const Value::Type ValueHelper<std::string>::TypeID = Value::STRING;
339+
template<> const Value::Type ValueHelper<Vector>::TypeID = Value::VECTOR;
340+
template<> const Value::Type ValueHelper<Matrix>::TypeID = Value::MATRIX;
341+
333342
} // namespace command
334343
} //namespace dynamicgraph

0 commit comments

Comments
 (0)