Commit 3a13c196 authored by Florent Lamiraux's avatar Florent Lamiraux Committed by Florent Lamiraux
Browse files

Specialize template DefaultCastRegisterer<std::string>::disp

  Default implementation adds std::endl at the end of the stream.
  In the case of string this extra '\n' is not desired.
parent 85fcf12f
......@@ -84,6 +84,14 @@ inline boost::any DefaultCastRegisterer<std::string>::cast
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, std::ostream &os)
os << boost::any_cast<std::string>(object);
/// Registers useful casts
namespace {
DefaultCastRegisterer<double> double_reg;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment