mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
strip noexcept
This commit is contained in:
parent
ef333e491a
commit
755f650a8d
@ -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();
|
||||
}
|
||||
|
||||
@ -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
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user