diff --git a/doc/type_index.qbk b/doc/type_index.qbk index ae2d211..d5909c7 100644 --- a/doc/type_index.qbk +++ b/doc/type_index.qbk @@ -1,7 +1,7 @@ [library Boost.TypeIndex [quickbook 1.6] [version 3.0] - [copyright 2012-2013 Antony Polukhin] + [copyright 2012-2014 Antony Polukhin] [category Language Features Emulation] [license Distributed under the Boost Software License, Version 1.0. diff --git a/examples/my_type_index.cpp_ b/examples/my_type_index.cpp_ deleted file mode 100644 index e03a125..0000000 --- a/examples/my_type_index.cpp_ +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2013-2014 Antony Polukhin - -// Distributed under the Boost Software License, Version 1.0. -// (See the accompanying file LICENSE_1_0.txt -// or a copy at .) - -//[type_index_my_type_index_sources -/*` - The following example shows how to create an own type_info clas and how - to use it all around the project. -*/ - -#define BOOST_TYPE_INDEX_USER_TYPEINFO \ - "../../../libs/type_index/examples/my_type_index.hpp" -#define BOOST_TYPE_INDEX_USER_TYPEINFO_NAME my_namespace::my_type_info -#include -#include - -class Base { -public: - virtual my_type_index type_info() const BOOST_NOEXCEPT { - return boost::typeind::type_info(); - } - virtual ~Base(){} -}; - -class Derived: public Base { -public: - virtual my_type_index type_info() const BOOST_NOEXCEPT { - return boost::typeind::type_id(); - } -}; - - -using boost::typeind; - -int main() { - Base base; - Derived derived; - - Base& derived_as_base; - - assert(type_id_runtime(derived) == type_id_runtime(derived_as_base)); - assert(type_id_runtime(base) != type_id_runtime(derived_as_base)); - assert(type_id_runtime(base) != type_id_runtime(derived)); - assert(type_id_runtime(derived_as_base).pretty_name() == "Derived"); -} - -//] [/type_index_registry_example] - -//] [/type_index_my_type_index_sources] diff --git a/examples/my_type_index.hpp b/examples/my_type_index.hpp deleted file mode 100644 index a1d6deb..0000000 --- a/examples/my_type_index.hpp +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright 2013-2014 Antony Polukhin - -// Distributed under the Boost Software License, Version 1.0. -// (See the accompanying file LICENSE_1_0.txt -// or a copy at .) - -//[type_index_my_type_index -/*` - The following example shows how to create an own type_info clas and how - to use it all around the project. -*/ - -#ifndef MY_NAMESPACE_MY_TYPE_INDEX_HPP -#define MY_NAMESPACE_MY_TYPE_INDEX_HPP - -// We'll use ctti_type_info as a base class for my_type_info -#include -namespace my_namespace { - -struct my_type_index: public ctti_type_info { - my_type_index(const ctti_type_info::type_info_t& data) BOOST_NOEXCEPT - : ctti_type_info(data) - {} - - template - static inline my_type_info construct_runtime(const T& value) BOOST_NOEXCEPT { - return value.type_info(); - } -}; - -} // namespace my_namespace - -#endif // MY_NAMESPACE_MY_TYPE_INDEX_HPP -//] [/type_index_my_type_index] - diff --git a/include/boost/type_index.hpp b/include/boost/type_index.hpp index 7bd2c2b..ecea183 100644 --- a/include/boost/type_index.hpp +++ b/include/boost/type_index.hpp @@ -53,10 +53,6 @@ namespace boost { namespace typeind { /// some user defined class. typedef type_index::type_info_t type_info; -// TODO: -// inline bool is_equal(const type_info&, const type_info&) BOOST_NOEXCEPT; -// inline bool is_before(const type_info&, const type_info&) BOOST_NOEXCEPT; - #if defined(BOOST_TYPE_INDEX_DOXYGEN_INVOKED) /// \def BOOST_TYPE_INDEX_USER_TYPEINFO diff --git a/include/boost/type_index/type_index_facade.hpp b/include/boost/type_index/type_index_facade.hpp index f4571c7..89f060a 100644 --- a/include/boost/type_index/type_index_facade.hpp +++ b/include/boost/type_index/type_index_facade.hpp @@ -145,7 +145,7 @@ protected: /// \param variable Variable which runtime type will be stored in type_index. /// \return type_index with runtime type of variable. template - static Derived type_id_runtime(const T& variablel) BOOST_NOEXCEPT; + static Derived type_id_runtime(const T& variable) BOOST_NOEXCEPT; #endif