From 7b04caa160c6335cae45d20a6619c2c2173b1565 Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Fri, 1 Aug 2014 12:34:34 +0400 Subject: [PATCH] Fixed problems reported by inspection program --- examples/table_of_names.cpp | 12 ++++++------ include/boost/type_index/ctti_type_index.hpp | 4 ++-- test/test_lib.cpp | 8 ++++++++ test/test_lib_anonymous.cpp | 8 ++++++++ 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/examples/table_of_names.cpp b/examples/table_of_names.cpp index 6880ce2..5d542b5 100644 --- a/examples/table_of_names.cpp +++ b/examples/table_of_names.cpp @@ -73,12 +73,12 @@ int main() { [table:id Table of names [[Type] [RTTI & raw_name] [RTTI & pretty_name] [noRTTI & raw_name]] - [[User defined type][`17user_defined_type`] [`user_defined_type`] [`user_defined_type]`] ] - [[In anonymous namespace][`N12_GLOBAL__N_112in_anon_typeE`] [`(anonymous namespace)::in_anon_type`] [`{anonymous}::in_anon_type]`] ] - [[In ns3::{anonymous}::ns4 namespace][`N3ns312_GLOBAL__N_13ns412in_anon_typeE`] [`ns3::(anonymous namespace)::ns4::in_anon_type`] [`ns3::{anonymous}::ns4::in_anon_type]`] ] - [[Template class][`5templIsiE`] [`templ`] [`templ]`] ] - [[Template class (full specialization)][`5templIiiE`] [`templ`] [`templ]`] ] - [[Template class with templae classes][`5templIS_IcaES_Ii17user_defined_typeEE`] [`templ, templ >`] [`templ, templ >]`] ] + [[User defined type][`17user_defined_type`] [`user_defined_type`] [`user_defined_type]`] ] + [[In anonymous namespace][`N12_GLOBAL__N_112in_anon_typeE`] [`(anonymous namespace)::in_anon_type`] [`{anonymous}::in_anon_type]`] ] + [[In ns3::{anonymous}::ns4 namespace][`N3ns312_GLOBAL__N_13ns412in_anon_typeE`] [`ns3::(anonymous namespace)::ns4::in_anon_type`] [`ns3::{anonymous}::ns4::in_anon_type]`] ] + [[Template class][`5templIsiE`] [`templ`] [`templ]`] ] + [[Template class (full specialization)][`5templIiiE`] [`templ`] [`templ]`] ] + [[Template class with templae classes][`5templIS_IcaES_Ii17user_defined_typeEE`] [`templ, templ >`] [`templ, templ >]`] ] ] We have not show the "noRTTI & pretty_name" column in the table becuse it is almost equal diff --git a/include/boost/type_index/ctti_type_index.hpp b/include/boost/type_index/ctti_type_index.hpp index 385eb9e..2e9858d 100644 --- a/include/boost/type_index/ctti_type_index.hpp +++ b/include/boost/type_index/ctti_type_index.hpp @@ -77,10 +77,10 @@ template inline const detail::ctti_data& ctti_construct() BOOST_NOEXCEPT { // Standard C++11, 5.2.10 Reinterpret cast: // An object pointer can be explicitly converted to an object pointer of a different type. When a prvalue - // v of type “pointer to T1” is converted to the type “pointer to cv T2”, the result is static_cast(static_cast(v)) if both T1 and T2 are standard-layout types (3.9) and the alignment // requirements of T2 are no stricter than those of T1, or if either type is void. Converting a prvalue of type - // “pointer to T1” to the type “pointer to T2” (where T1 and T2 are object types and where the alignment + // "pointer to T1" to the type "pointer to T2" (where T1 and T2 are object types and where the alignment // requirements of T2 are no stricter than those of T1) and back to its original type yields the original pointer // value. // diff --git a/test/test_lib.cpp b/test/test_lib.cpp index dcb3d44..f0680ce 100644 --- a/test/test_lib.cpp +++ b/test/test_lib.cpp @@ -1,3 +1,11 @@ +// +// Copyright (c) Antony Polukhin, 2012-2014. +// +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + #define TEST_LIB_SOURCE #include "test_lib.hpp" diff --git a/test/test_lib_anonymous.cpp b/test/test_lib_anonymous.cpp index 8d14a4b..fdf8c15 100644 --- a/test/test_lib_anonymous.cpp +++ b/test/test_lib_anonymous.cpp @@ -1,3 +1,11 @@ +// +// Copyright (c) Antony Polukhin, 2012-2014. +// +// +// Distributed under the Boost Software License, Version 1.0. (See accompanying +// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// + #define TEST_LIB_SOURCE #include "test_lib_anonymous.hpp"