Fixed MSVC related bugs

This commit is contained in:
Antony Polukhin
2013-10-31 15:55:34 +04:00
parent 79fbd3ab5c
commit 19fef8ddab
2 changed files with 4 additions and 2 deletions

View File

@ -232,7 +232,9 @@ public:
/// Returns user-friendly name
std::string name_demangled() const {
return std::string(name_, std::strlen(name_ + detail::ctti_skip_size_at_end));
std::size_t len = std::strlen(name_ + detail::ctti_skip_size_at_end);
while (name_[len - 1] == ' ') --len; // MSVC sometimes adds whitespaces
return std::string(name_, len);
}
bool operator == (const template_info& rhs) const BOOST_NOEXCEPT {

View File

@ -175,7 +175,7 @@ public:
}
std::string::size_type end = ret.rfind(">");
BOOST_ASSERT(end != std::string::npos);
while (ret[end] == ' ') {
while (ret[end - 1] == ' ') {
-- end;
}