Applied first portion of fixes, proposed by Vicente J. Botet Escriba

This commit is contained in:
Antony Polukhin
2013-11-13 10:35:20 +04:00
parent 986ff55058
commit 9e4e48a9b3
4 changed files with 13 additions and 13 deletions

View File

@@ -26,7 +26,7 @@
#include <boost/type_index/type_info.hpp>
// MSVC is capable of calling typeid(T) even when RTTI is off
#if (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
#if (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
#if !defined(BOOST_NO_IOSTREAM)
#if !defined(BOOST_NO_IOSFWD)
@@ -206,7 +206,7 @@ inline std::size_t hash_value(type_index const& v) BOOST_NOEXCEPT {
} // namespace boost
#else // (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
#else // (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
#include <boost/type_index/template_index.hpp>
namespace boost {
@@ -215,7 +215,7 @@ typedef template_index type_index;
}
#endif // (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
#endif // (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
#endif // BOOST_TYPE_INDEX_TYPE_INDEX_HPP

View File

@@ -21,7 +21,7 @@
/// this class has a name_demangled() function for getting human-readable type names.
///
/// boost::type_info class is used in situations when RTTI is enabled.
/// When RTTI is disabled or BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY macro is defined boost::template_info
/// When RTTI is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined boost::template_info
/// is usually used instead of it (some compilers allow calling typeid(T)
/// even if RTTI is disabled, those copilers will continue to use boost::type_info class).
@@ -29,7 +29,7 @@
// MSVC is capable of calling typeid(T) even when RTTI is off
#if (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
#if (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined(BOOST_MSVC)
#include <cstring>
#include <string>
@@ -81,7 +81,7 @@ namespace detail {
/// boost::type_info is a class that can be used as a drop-in replacement for std::type_info.
///
/// boost::type_info class is used in situations when RTTI is enabled.
/// When RTTI is disabled or BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY macro is defined boost::template_info
/// When RTTI is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro is defined boost::template_info
/// is used instead of it.
///
/// Unlike std::type_info this class:
@@ -319,7 +319,7 @@ inline std::size_t hash_value(type_info const& v) BOOST_NOEXCEPT {
} // namespace boost
#else // !defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY)
#else // !defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)
# include <boost/type_index/template_info.hpp>
# include <boost/static_assert.hpp>
@@ -351,14 +351,14 @@ inline const type_info& type_id_rtti_only(T* rtti_val) {
} // namespace boost
#endif // (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY)) || defined (BOOST_MSVC)
#endif // (!defined(BOOST_NO_RTTI) && !defined(BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY)) || defined (BOOST_MSVC)
#if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED)
/// \def BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY
/// Define the BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY macro if you are mixing objects
/// \def BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
/// Define the BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro if you are mixing objects
/// compiled with different RTTI flags. This will force the usage of boost::template_index
/// class instead of boost::type_index.
#define BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY
#define BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY
#endif // BOOST_TYPE_INDEX_DOXYGEN_INVOKED
#endif // BOOST_TYPE_INDEX_TYPE_INFO_HPP

View File

@@ -30,7 +30,7 @@ Boost.TypeIndex library was designed to work around all those issues.
[section Getting started]
`boost::type_info` is a drop-in replacement for `std::type_index` and `boost::type_index` is a drop-in
`boost::type_info` is a drop-in replacement for `std::type_info` and `boost::type_index` is a drop-in
replacement for `std::type_index`. Unlike Standard Library versions those classes may work without RTTI.
`boost::type_index` provides the full set of comparison operators, hashing functions and ostream

View File

@@ -12,7 +12,7 @@ import feature ;
tlib = /boost/test//boost_unit_test_framework/<link>static ;
# Variable that contains all the stuff required for linking together <rtti>on and <rtti>off
compat = <define>BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY ;
compat = <define>BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY ;
# Making own `nortti` that is link compatible
nortti = <toolset>gcc:<cxxflags>-fno-rtti <toolset>clang:<cxxflags>-fno-rtti <toolset>msvc:<cxxflags>/GR- ;