diff --git a/v4/any.h b/v4/any.h index 1ba4b84..0e6f6fb 100644 --- a/v4/any.h +++ b/v4/any.h @@ -8,15 +8,13 @@ * + http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4562.html#any * + https://cplusplus.github.io/LWG/lwg-active.html#2509 * - * Copyright (c) 2016 Denilson das Merc?s Amorim + * Copyright (c) 2016 Denilson das Mercês Amorim * Copyright (c) 2018 Claudio Fantacci * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE.md or copy at http://www.boost.org/LICENSE_1_0.txt) */ -#include - #ifndef ANY_H #define ANY_H @@ -469,10 +467,7 @@ template inline ValueType any_cast(const any& operand) { auto p = any_cast::type>::type>(&operand); - if(p == nullptr) { - std::cout << "libany err-01\n"; - throw bad_any_cast(); - } + if(p == nullptr) throw bad_any_cast(); return *p; } @@ -484,11 +479,7 @@ template inline ValueType any_cast(any& operand) { auto p = any_cast::type>(&operand); - if(p == nullptr) { - std::cout << "libany err-02\n"; - throw bad_any_cast(); - } - + if(p == nullptr) throw bad_any_cast(); return *p; } @@ -515,10 +506,7 @@ inline ValueType any_cast(any&& operand) #endif auto p = any_cast::type>(&operand); - if(p == nullptr) { - std::cout << "libany err-03\n"; - throw bad_any_cast(); - } + if(p == nullptr) throw bad_any_cast(); return detail::any_cast_move_if_true(p, can_move()); }