prefix_ std::string
senf::console::detail::CollectionArgumentTraitsBase<Collection>::description()
{
- std::string type (prettyName(typeid(Collection)));
- std::string::size_type e (type.find('<'));
- if (e == std::string::npos) e = type.size();
- std::string::size_type b (type.rfind(':', e));
- if (b == std::string::npos) b = 0; else ++b;
- return type.substr(b,e-b) + "<"
+ return senf::prettyBaseName(typeid(Collection)) + "<"
+ ArgumentTraits<typename Collection::value_type>::description() + ">";
}
template <class Collection>
prefix_ std::string senf::console::detail::MapArgumentTraits<Collection>::description()
{
- std::string type (prettyName(typeid(Collection)));
- std::string::size_type e (type.find('<'));
- if (e == std::string::npos) e = type.size();
- std::string::size_type b (type.rfind(':', e));
- if (b == std::string::npos) b = 0; else ++b;
- return type.substr(b,e-b) + "<"
+ return senf::prettyBaseName(typeid(Collection)) + "<"
+ ArgumentTraits<typename Collection::key_type>::description() + ","
+ ArgumentTraits<typename Collection::mapped_type>::description() + ">";
}