diff --git a/boost/template_id.html b/boost/template_id.html index 89cb0f5..57f3af7 100644 --- a/boost/template_id.html +++ b/boost/template_id.html @@ -34,7 +34,7 @@ template<typename T> template_index template_id();
-

Description

+

Description

Method for constructing template_index instance for type T. Strips const, volatile and & modifiers from T.

diff --git a/boost/template_id_with_cvr.html b/boost/template_id_with_cvr.html index 0fbb675..99a1ff7 100644 --- a/boost/template_id_with_cvr.html +++ b/boost/template_id_with_cvr.html @@ -34,7 +34,7 @@ template<typename T> template_index template_id_with_cvr();
-

Description

+

Description

Factory method for constructing template_index instance for type T. Does not strip const, volatile and & modifiers from T. If T has no const, volatile, & and && modifiers, then returns exactly the same result as in case of calling `template_id<T>()`.

diff --git a/boost/template_index.html b/boost/template_index.html index 5a4895c..d063d6f 100644 --- a/boost/template_index.html +++ b/boost/template_index.html @@ -35,59 +35,59 @@ class template_index { public: // construct/copy/destruct - template_index(); + template_index() noexcept; - // public member functions - bool before(const template_index &) const; - const char * name() const; - std::string name_demangled() const; - std::size_t hash_code() const; + // public member functions + bool before(const template_index &) const noexcept; + const char * name() const noexcept; + std::string name_demangled() const; + std::size_t hash_code() const noexcept; - // public static functions - template<typename T> static template_index construct(); - template<typename T> static template_index construct_with_cvr(); + // public static functions + template<typename T> static template_index construct(); + template<typename T> static template_index construct_with_cvr(); };
-

Description

+

Description

Copyable type_info that does not require RTTI and could store const, volatile and references if constructed via construct_with_cvr()

-

+

template_index public construct/copy/destruct

  1. -
    template_index();
    +
    template_index() noexcept;

    Default constructor.

-

-template_index public member functions

+

+template_index public member functions

  1. -
    bool before(const template_index & rhs) const;
    +
    bool before(const template_index & rhs) const noexcept;

    Returns true if the type precedes the type of rhs in the collation order. The collation order is just an internal order.

  2. -
    const char * name() const;
    Returns raw name.
  3. +
    const char * name() const noexcept;
    Returns raw name.
  4. -
    std::string name_demangled() const;
    Returns user-friendly name.
  5. +
    std::string name_demangled() const;
    Returns user-friendly name.
  6. -
    std::size_t hash_code() const;
    +
    std::size_t hash_code() const noexcept;

    Function for getting hash value

-

-template_index public static functions

+

+template_index public static functions

  1. -
    template<typename T> static template_index construct();
    +
    template<typename T> static template_index construct();

    Factory method for constructing template_index instance for type T. Strips const, volatile and & modifiers from T

  2. -
    template<typename T> static template_index construct_with_cvr();
    +
    template<typename T> static template_index construct_with_cvr();

    Factory method for constructing template_index instance for type T. Does not strip const, volatile and & modifiers from T

diff --git a/boost/type_id.html b/boost/type_id.html index ead5675..9d3b6c3 100644 --- a/boost/type_id.html +++ b/boost/type_id.html @@ -34,7 +34,7 @@ template<typename T> type_index type_id();
-

Description

+

Description

Function, to get type_index for a type T. Strips const, volatile and & modifiers from T.

diff --git a/boost/type_id_rtti_on_idp5760464.html b/boost/type_id_rtti_on_idp5430736.html similarity index 93% rename from boost/type_id_rtti_on_idp5760464.html rename to boost/type_id_rtti_on_idp5430736.html index 25973d8..06c06e4 100644 --- a/boost/type_id_rtti_on_idp5760464.html +++ b/boost/type_id_rtti_on_idp5430736.html @@ -7,7 +7,7 @@ - + @@ -20,10 +20,10 @@

-PrevUpHomeNext +PrevUpHomeNext
-
+

Function template type_id_rtti_only

boost::type_id_rtti_only

@@ -34,7 +34,7 @@ template<typename T> type_index type_id_rtti_only(T & rtti_val);
-

Description

+

Description

Function, that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index. This method available only with RTTI enabled. Without RTTI support it won't compile, producing a compile-time error with message: "boost::type_id_rtti_only(T&) requires RTTI"

@@ -48,7 +48,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/boost/type_id_rtti_on_idp5763792.html b/boost/type_id_rtti_on_idp5434192.html similarity index 93% rename from boost/type_id_rtti_on_idp5763792.html rename to boost/type_id_rtti_on_idp5434192.html index 0abdbff..813c7c3 100644 --- a/boost/type_id_rtti_on_idp5763792.html +++ b/boost/type_id_rtti_on_idp5434192.html @@ -6,7 +6,7 @@ - + @@ -20,10 +20,10 @@
-PrevUpHomeNext +PrevUpHomeNext
-
+

Function template type_id_rtti_only

boost::type_id_rtti_only

@@ -34,7 +34,7 @@ template<typename T> type_index type_id_rtti_only(T * rtti_val);
-

Description

+

Description

Function, that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index. This method available only with RTTI enabled. Without RTTI support it won't compile, producing a compile-time error with message: "boost::type_id_rtti_only(T*) requires RTTI"

@@ -48,7 +48,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/boost/type_id_with_cvr.html b/boost/type_id_with_cvr.html index a32090b..f4c4a7a 100644 --- a/boost/type_id_with_cvr.html +++ b/boost/type_id_with_cvr.html @@ -7,7 +7,7 @@ - + @@ -20,7 +20,7 @@

-PrevUpHomeNext +PrevUpHomeNext
@@ -34,7 +34,7 @@ template<typename T> type_index type_id_with_cvr();
-

Description

+

Description

Function for constructing type_index instance for type T. Does not strip const, volatile, & and && modifiers from T. If T has no const, volatile, & and && modifiers, then returns exactly the same result as in case of calling `type_id<T>()`.

@@ -48,7 +48,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/boost/type_index.html b/boost/type_index.html index ae5bcdc..b51bc54 100644 --- a/boost/type_index.html +++ b/boost/type_index.html @@ -38,69 +38,69 @@ typedef std::type_info stl_type_info; // construct/copy/destruct - type_index(); - explicit type_index(const stl_type_info &); + type_index() noexcept; + explicit type_index(const stl_type_info &) noexcept; - // public member functions - bool before(type_index const &) const; - const char * name() const; - std::string name_demangled() const; - std::size_t hash_code() const; + // public member functions + bool before(type_index const &) const noexcept; + const char * name() const noexcept; + std::string name_demangled() const; + std::size_t hash_code() const noexcept; - // public static functions - template<typename T> static type_index construct(); - template<typename T> static type_index construct_with_cvr(); - template<typename T> static type_index construct_rtti_only(T &); - template<typename T> static type_index construct_rtti_only(T *); + // public static functions + template<typename T> static type_index construct() noexcept; + template<typename T> static type_index construct_with_cvr() noexcept; + template<typename T> static type_index construct_rtti_only(T &); + template<typename T> static type_index construct_rtti_only(T *); };
-

Description

+

Description

-

+

type_index public construct/copy/destruct

  1. -
    type_index();
    Default constructor.
  2. +
    type_index() noexcept;
    Default constructor.
  3. -
    explicit type_index(const stl_type_info & inf);
    Constructs type_index from an instance of std::type_info.
  4. +
    explicit type_index(const stl_type_info & inf) noexcept;
    Constructs type_index from an instance of std::type_info.
-

-type_index public member functions

+

+type_index public member functions

  1. -
    bool before(type_index const & rhs) const;
    +
    bool before(type_index const & rhs) const noexcept;

    Returns true if the type precedes the type of rhs in the collation order. The collation order is just an internal order.

  2. -
    const char * name() const;
    Returns raw name.
  3. +
    const char * name() const noexcept;
    Returns raw name.
  4. -
    std::string name_demangled() const;
    Returns user-friendly name.
  5. +
    std::string name_demangled() const;
    Returns user-friendly name.
  6. -
    std::size_t hash_code() const;
    Function for getting hash value.
  7. +
    std::size_t hash_code() const noexcept;
    Function for getting hash value.
-

-type_index public static functions

+

+type_index public static functions

  1. -
    template<typename T> static type_index construct();
    +
    template<typename T> static type_index construct() noexcept;

    Factory method for constructing type_index instance for type T. Strips const, volatile and & modifiers from T.

  2. -
    template<typename T> static type_index construct_with_cvr();
    +
    template<typename T> static type_index construct_with_cvr() noexcept;

    Factory method for constructing type_index instance for type T. Does not strip const, volatile, & and && modifiers from T. If T has no const, volatile, & and && modifiers, then returns exactly the same result as in case of calling `construct<T>()`.

  3. -
    template<typename T> static type_index construct_rtti_only(T & rtti_val);
    +
    template<typename T> static type_index construct_rtti_only(T & rtti_val);

    Factory function, that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index. This method available only with RTTI enabled.

  4. -
    template<typename T> static type_index construct_rtti_only(T * rtti_val);
    +
    template<typename T> static type_index construct_rtti_only(T * rtti_val);

    Factory function, that works exactly like C++ typeid(rtti_val) call, but returns boost::type_index. This method available only with RTTI enabled.

diff --git a/boost_typeindex/compiler_support.html b/boost_typeindex/compiler_support.html index 28fb572..feb8a7f 100644 --- a/boost_typeindex/compiler_support.html +++ b/boost_typeindex/compiler_support.html @@ -7,6 +7,7 @@ + @@ -19,7 +20,7 @@

-PrevUpHome +PrevUpHomeNext

@@ -84,7 +85,7 @@
-PrevUpHome +PrevUpHomeNext
diff --git a/boost_typeindex/mixing_sources_with_rtti_on_and_rtti_off.html b/boost_typeindex/mixing_sources_with_rtti_on_and_rtti_off.html new file mode 100644 index 0000000..4321a85 --- /dev/null +++ b/boost_typeindex/mixing_sources_with_rtti_on_and_rtti_off.html @@ -0,0 +1,105 @@ + + + +Mixing sources with RTTI on and RTTI off + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHome +
+
+ +

+ Linking a binary from source files that were compiled with different RTTI flags + is not a very good idea and may lead to a lot of surprises. However if there + is a very strong need TypeIndex library provides a solution for mixing sources: + just define BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY + macro. This would lead to usage of boost::template_index + instead of boost::type_index class. +

+
+ + + + + +
[Note]Note

+ Do not forget to rebuild all the projects + with BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY + macro defined +

+

+ You must know that linking RTTI on and RTTI off binaries may succeed even without + defining the BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY + macro, but that does not mean that you'll get a working binary. Such actions + may break the One Definition Rule. Take a look at the table below, that shows + how the boost::type_index get_integer(); function will look like with different RTTI + flags: +

+
+ ++++ + + + + + + + + +
+

+ RTTI on +

+
+

+ RTTI off +

+
+

+ boost::type_index get_integer(); +

+
+

+ boost::template_index get_integer(); +

+
+
+

+ Such differences are usually not detected by linker and lead to errors at runtime. +

+
+ + + +
+
+
+PrevUpHome +
+ + diff --git a/boost_typeindex/space_and_performance.html b/boost_typeindex/space_and_performance.html index 63409ff..52b5799 100644 --- a/boost_typeindex/space_and_performance.html +++ b/boost_typeindex/space_and_performance.html @@ -6,7 +6,7 @@ - + @@ -20,7 +20,7 @@
-PrevUpHomeNext +PrevUpHomeNext

@@ -69,7 +69,7 @@
-PrevUpHomeNext +PrevUpHomeNext
diff --git a/boost_typeindex_header_reference.html b/boost_typeindex_header_reference.html index b844cff..547d2f0 100644 --- a/boost_typeindex_header_reference.html +++ b/boost_typeindex_header_reference.html @@ -51,7 +51,7 @@ // Ostream operator that will output demangled name. template<typename CharT, typename TriatT> std::basic_ostream< CharT, TriatT > & - operator<<(std::basic_ostream< CharT, TriatT > & ostr, + operator<<(std::basic_ostream< CharT, TriatT > & ostr, template_index const & ind); // hash_value function overload for template_index @@ -67,15 +67,16 @@ class type_index; template<typename T> type_index type_id(); template<typename T> type_index type_id_with_cvr(); - template<typename T> type_index type_id_rtti_only(T &); - template<typename T> type_index type_id_rtti_only(T *); + template<typename T> type_index type_id_rtti_only(T &); + template<typename T> type_index type_id_rtti_only(T *); }

This is the header that required for ussage of type_index with/without RTTI.

-

It includes only the minamally required headers and does the `typedef template_index type_index;` when RTTI is disabled.

+

It includes only the minamally required headers and does the `typedef template_index type_index;` when RTTI is disabled.

+

Define the BOOST_TYPE_INDEX_FORCE_NORTTI_COMPATIBILITY macro if you are mixing objects compiled with different RTTI flags.

diff --git a/index.html b/index.html index 8ef9fbb..3f836aa 100644 --- a/index.html +++ b/index.html @@ -56,6 +56,8 @@
Space and Performance
Code bloat
Compiler support
+
Mixing + sources with RTTI on and RTTI off
@@ -119,7 +121,7 @@
- +

Last revised: October 17, 2013 at 07:39:53 GMT

Last revised: October 22, 2013 at 12:36:27 GMT


diff --git a/standalone_HTML.manifest b/standalone_HTML.manifest index b8b4e95..64ea035 100644 --- a/standalone_HTML.manifest +++ b/standalone_HTML.manifest @@ -8,8 +8,9 @@ boost/template_id_with_cvr.html boost/type_index.html boost/type_id.html boost/type_id_with_cvr.html -boost/type_id_rtti_on_idp5760464.html -boost/type_id_rtti_on_idp5763792.html +boost/type_id_rtti_on_idp5430736.html +boost/type_id_rtti_on_idp5434192.html boost_typeindex/space_and_performance.html boost_typeindex/code_bloat.html boost_typeindex/compiler_support.html +boost_typeindex/mixing_sources_with_rtti_on_and_rtti_off.html