From 7735de9238749aaf30b7a5e4af2700fa6d4bc9c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9C=D0=B8=D1=85=D0=B0=D0=B8=D0=BB=20=D0=9A=D0=B0=D0=BF?= =?UTF-8?q?=D0=B5=D0=BB=D1=8C=D0=BA=D0=BE?= Date: Wed, 5 Jun 2024 23:21:09 +0300 Subject: [PATCH] d --- v4/any.h | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) 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()); }