mirror of
https://github.com/boostorg/type_index.git
synced 2025-07-31 12:57:17 +02:00
Fixed MSVC related bugs
This commit is contained in:
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user