diff --git a/boost/type_index.hpp b/boost/type_index.hpp index b8fb9e2..b415a45 100644 --- a/boost/type_index.hpp +++ b/boost/type_index.hpp @@ -14,7 +14,7 @@ /// By inclusion of this file all classes (boost::type_info + boost::type_index if RTTI is on /// and boost::template_info + boost::template_index) will be available. /// -/// Consider including if you do not whant to include +/// Consider including if you do not want to include /// boost::template_info and boost::template_index class while RTTI is available. /// /// Consider including if you need only boost::type_info class diff --git a/boost/type_index/template_info.hpp b/boost/type_index/template_info.hpp index c06262d..6c8a75b 100644 --- a/boost/type_index/template_info.hpp +++ b/boost/type_index/template_info.hpp @@ -236,27 +236,27 @@ public: } bool operator == (const template_info& rhs) const BOOST_NOEXCEPT { - return !std::strcmp(name_, rhs.name()); + return name_ == rhs.name() || !std::strcmp(name_, rhs.name()); } bool operator != (const template_info& rhs) const BOOST_NOEXCEPT { - return !!std::strcmp(name_, rhs.name()); + return name_ != rhs.name() && !!std::strcmp(name_, rhs.name()); } bool operator < (const template_info& rhs) const BOOST_NOEXCEPT { - return std::strcmp(name_, rhs.name()) < 0; + return name_ != rhs.name() && std::strcmp(name_, rhs.name()) < 0; } bool operator > (const template_info& rhs) const BOOST_NOEXCEPT { - return std::strcmp(name_, rhs.name()) > 0; + return name_ != rhs.name() && std::strcmp(name_, rhs.name()) > 0; } bool operator <= (const template_info& rhs) const BOOST_NOEXCEPT { - return std::strcmp(name_, rhs.name()) <= 0; + return name_ == rhs.name() || std::strcmp(name_, rhs.name()) <= 0; } bool operator >= (const template_info& rhs) const BOOST_NOEXCEPT { - return std::strcmp(name_, rhs.name()) >= 0; + return name_ == rhs.name() || std::strcmp(name_, rhs.name()) >= 0; } /// Function for getting hash value diff --git a/boost/type_index/type_info.hpp b/boost/type_index/type_info.hpp index 8032506..898d5bc 100644 --- a/boost/type_index/type_info.hpp +++ b/boost/type_index/type_info.hpp @@ -184,7 +184,7 @@ public: bool operator == (type_info const& rhs) const BOOST_NOEXCEPT { #ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES - return !std::strcmp(name(), rhs.name()); + return name() == rhs.name() || !std::strcmp(name(), rhs.name()); #else return static_cast(*this) == static_cast(rhs); #endif @@ -207,7 +207,7 @@ public: /// Works exactly like operator < bool before(type_info const& rhs) const BOOST_NOEXCEPT { #ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES - return std::strcmp(name(), rhs.name()) < 0; + return name() != rhs.name() && std::strcmp(name(), rhs.name()) < 0; #else return stl_type_info::before(rhs); #endif diff --git a/patched/property_map/README.md b/patched/property_map/README.md new file mode 100644 index 0000000..edc0074 --- /dev/null +++ b/patched/property_map/README.md @@ -0,0 +1,3 @@ +This patch requires additional care. + +It works and tested through the Boost.Graph tests, but in some places `typeid(variable)` were replaced with `typeid(Type)`.