From 755f650a8d5d2e2ab23223f976d1e4765243b24f Mon Sep 17 00:00:00 2001 From: Jason Turner Date: Fri, 21 Jul 2017 05:44:20 -0600 Subject: [PATCH] strip `noexcept` --- .../chaiscript/dispatchkit/boxed_value.hpp | 26 +++++++++---------- include/chaiscript/dispatchkit/type_info.hpp | 26 +++++++++---------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/include/chaiscript/dispatchkit/boxed_value.hpp b/include/chaiscript/dispatchkit/boxed_value.hpp index ce943eb9..8938424e 100644 --- a/include/chaiscript/dispatchkit/boxed_value.hpp +++ b/include/chaiscript/dispatchkit/boxed_value.hpp @@ -221,23 +221,23 @@ namespace chaiscript return *this; } - const Type_Info &get_type_info() const noexcept + const Type_Info &get_type_info() const { return m_data->m_type_info; } /// return true if the object is uninitialized - bool is_undef() const noexcept + bool is_undef() const { return m_data->m_type_info.is_undef(); } - bool is_const() const noexcept + bool is_const() const { return m_data->m_type_info.is_const(); } - bool is_type(const Type_Info &ti) const noexcept + bool is_type(const Type_Info &ti) const { return m_data->m_type_info.bare_equal(ti); } @@ -278,42 +278,42 @@ namespace chaiscript return Sentinel(ptr, *(m_data.get())); } - bool is_null() const noexcept + bool is_null() const { return (m_data->m_data_ptr == nullptr && m_data->m_const_data_ptr == nullptr); } - const chaiscript::detail::Any & get() const noexcept + const chaiscript::detail::Any & get() const { return m_data->m_obj; } - bool is_ref() const noexcept + bool is_ref() const { return m_data->m_is_ref; } - bool is_return_value() const noexcept + bool is_return_value() const { return m_data->m_return_value; } - void reset_return_value() const noexcept + void reset_return_value() const { m_data->m_return_value = false; } - bool is_pointer() const noexcept + bool is_pointer() const { return !is_ref(); } - void *get_ptr() const noexcept + void *get_ptr() const { return m_data->m_data_ptr; } - const void *get_const_ptr() const noexcept + const void *get_const_ptr() const { return m_data->m_const_data_ptr; } @@ -353,7 +353,7 @@ namespace chaiscript /// \returns true if the two Boxed_Values share the same internal type - static bool type_match(const Boxed_Value &l, const Boxed_Value &r) noexcept + static bool type_match(const Boxed_Value &l, const Boxed_Value &r) { return l.get_type_info() == r.get_type_info(); } diff --git a/include/chaiscript/dispatchkit/type_info.hpp b/include/chaiscript/dispatchkit/type_info.hpp index 4480f3c7..ba377d21 100644 --- a/include/chaiscript/dispatchkit/type_info.hpp +++ b/include/chaiscript/dispatchkit/type_info.hpp @@ -46,49 +46,49 @@ namespace chaiscript Type_Info() = default; - bool operator<(const Type_Info &ti) const noexcept + bool operator<(const Type_Info &ti) const { return m_type_info < ti.m_type_info; } - bool operator!=(const Type_Info &ti) const noexcept + bool operator!=(const Type_Info &ti) const { return !(operator==(ti)); } - bool operator!=(const std::type_info &ti) const noexcept + bool operator!=(const std::type_info &ti) const { return !(operator==(ti)); } - bool operator==(const Type_Info &ti) const noexcept + bool operator==(const Type_Info &ti) const { return ti.m_type_info == m_type_info || *ti.m_type_info == *m_type_info; } - bool operator==(const std::type_info &ti) const noexcept + bool operator==(const std::type_info &ti) const { return !is_undef() && (*m_type_info) == ti; } - bool bare_equal(const Type_Info &ti) const noexcept + bool bare_equal(const Type_Info &ti) const { return ti.m_bare_type_info == m_bare_type_info || *ti.m_bare_type_info == *m_bare_type_info; } - bool bare_equal_type_info(const std::type_info &ti) const noexcept + bool bare_equal_type_info(const std::type_info &ti) const { return !is_undef() && (*m_bare_type_info) == ti; } - bool is_const() const noexcept { return (m_flags & (1 << is_const_flag)) != 0; } - bool is_reference() const noexcept { return (m_flags & (1 << is_reference_flag)) != 0; } - bool is_void() const noexcept { return (m_flags & (1 << is_void_flag)) != 0; } - bool is_arithmetic() const noexcept { return (m_flags & (1 << is_arithmetic_flag)) != 0; } - bool is_undef() const noexcept { return (m_flags & (1 << is_undef_flag)) != 0; } - bool is_pointer() const noexcept { return (m_flags & (1 << is_pointer_flag)) != 0; } + bool is_const() const { return (m_flags & (1 << is_const_flag)) != 0; } + bool is_reference() const { return (m_flags & (1 << is_reference_flag)) != 0; } + bool is_void() const { return (m_flags & (1 << is_void_flag)) != 0; } + bool is_arithmetic() const { return (m_flags & (1 << is_arithmetic_flag)) != 0; } + bool is_undef() const { return (m_flags & (1 << is_undef_flag)) != 0; } + bool is_pointer() const { return (m_flags & (1 << is_pointer_flag)) != 0; } std::string name() const {