Skip to content
Snippets Groups Projects
Commit 5daf1d39 authored by Olivier Stasse's avatar Olivier Stasse
Browse files

[signal-cast-helper] Removed unused template specialization

This commit removes template specialization not exposed in header
files, and better handled by the default implementation.
parent eb1f3327
No related branches found
No related tags found
No related merge requests found
......@@ -52,36 +52,6 @@ inline boost::any DefaultCastRegisterer<double>::cast(std::istringstream &iss) {
}
}
/* Specialize Matrix and Vector traces. */
template <>
void DefaultCastRegisterer<dynamicgraph::Vector>::trace(
const boost::any &object, std::ostream &os) {
const dynamicgraph::Vector &v = boost::any_cast<dynamicgraph::Vector>(object);
for (int i = 0; i < v.size(); ++i) {
os << "\t" << v(i);
}
}
template <>
void DefaultCastRegisterer<dynamicgraph::Matrix>::trace(
const boost::any &object, std::ostream &os) {
const dynamicgraph::Matrix &m = boost::any_cast<dynamicgraph::Matrix>(object);
for (int i = 0; i < m.rows(); ++i)
for (int j = 0; j < m.cols(); ++j) {
os << "\t" << m(i, j);
}
}
// for std::string, do not check failure. If input stream contains an
// empty string, iss.fail() returns true and an exception is thrown
template <>
inline boost::any
DefaultCastRegisterer<std::string>::cast(std::istringstream &iss) {
std::string inst(iss.str());
return inst;
}
// for std::string, do not add std::endl at the end of the stream.
template <>
inline void DefaultCastRegisterer<std::string>::disp(const boost::any &object,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment