Skip to content

Commit

Permalink
fix #231, redux
Browse files Browse the repository at this point in the history
  • Loading branch information
marzer committed Jul 12, 2024
1 parent 495119a commit e2bae9d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions include/toml++/impl/array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,11 @@ TOML_NAMESPACE_START
TOML_EXPORTED_MEMBER_FUNCTION
bool is_homogeneous(node_type ntype) const noexcept final;

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXPORTED_MEMBER_FUNCTION
bool is_homogeneous(node_type ntype, node*& first_nonmatch) noexcept final;

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXPORTED_MEMBER_FUNCTION
bool is_homogeneous(node_type ntype, const node*& first_nonmatch) const noexcept final;

Expand Down Expand Up @@ -1555,8 +1555,8 @@ TOML_NAMESPACE_START
{
using raw_elem_type = impl::remove_cvref<ElemType>;
using elem_type = std::conditional_t<std::is_void_v<raw_elem_type>, //
impl::emplaced_type_of<Args&&...>,
raw_elem_type>;
impl::emplaced_type_of<Args&&...>,
raw_elem_type>;

using type = impl::remove_cvref<impl::unwrap_node<elem_type>>;
static_assert(impl::is_native<type> || impl::is_one_of<type, table, array>,
Expand Down Expand Up @@ -1660,8 +1660,8 @@ TOML_NAMESPACE_START
{
using raw_elem_type = impl::remove_cvref<ElemType>;
using elem_type = std::conditional_t<std::is_void_v<raw_elem_type>, //
impl::emplaced_type_of<Args&&...>,
raw_elem_type>;
impl::emplaced_type_of<Args&&...>,
raw_elem_type>;

static constexpr auto moving_node_ptr = std::is_same_v<elem_type, impl::node_ptr> //
&& sizeof...(Args) == 1u //
Expand Down
4 changes: 2 additions & 2 deletions include/toml++/impl/array.inl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ TOML_NAMESPACE_START
return true;
}

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXTERNAL_LINKAGE
bool array::is_homogeneous(node_type ntype, node * &first_nonmatch) noexcept
{
Expand All @@ -179,7 +179,7 @@ TOML_NAMESPACE_START
return true;
}

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXTERNAL_LINKAGE
bool array::is_homogeneous(node_type ntype, const node*& first_nonmatch) const noexcept
{
Expand Down
4 changes: 2 additions & 2 deletions include/toml++/impl/table.inl
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ TOML_NAMESPACE_START
return true;
}

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXTERNAL_LINKAGE
bool table::is_homogeneous(node_type ntype, node * &first_nonmatch) noexcept
{
Expand All @@ -149,7 +149,7 @@ TOML_NAMESPACE_START
return true;
}

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXTERNAL_LINKAGE
bool table::is_homogeneous(node_type ntype, const node*& first_nonmatch) const noexcept
{
Expand Down
20 changes: 10 additions & 10 deletions toml.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6378,11 +6378,11 @@ TOML_NAMESPACE_START
TOML_EXPORTED_MEMBER_FUNCTION
bool is_homogeneous(node_type ntype) const noexcept final;

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXPORTED_MEMBER_FUNCTION
bool is_homogeneous(node_type ntype, node*& first_nonmatch) noexcept final;

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXPORTED_MEMBER_FUNCTION
bool is_homogeneous(node_type ntype, const node*& first_nonmatch) const noexcept final;

Expand Down Expand Up @@ -7067,8 +7067,8 @@ TOML_NAMESPACE_START
{
using raw_elem_type = impl::remove_cvref<ElemType>;
using elem_type = std::conditional_t<std::is_void_v<raw_elem_type>, //
impl::emplaced_type_of<Args&&...>,
raw_elem_type>;
impl::emplaced_type_of<Args&&...>,
raw_elem_type>;

using type = impl::remove_cvref<impl::unwrap_node<elem_type>>;
static_assert(impl::is_native<type> || impl::is_one_of<type, table, array>,
Expand Down Expand Up @@ -7105,8 +7105,8 @@ TOML_NAMESPACE_START
{
using raw_elem_type = impl::remove_cvref<ElemType>;
using elem_type = std::conditional_t<std::is_void_v<raw_elem_type>, //
impl::emplaced_type_of<Args&&...>,
raw_elem_type>;
impl::emplaced_type_of<Args&&...>,
raw_elem_type>;

static constexpr auto moving_node_ptr = std::is_same_v<elem_type, impl::node_ptr> //
&& sizeof...(Args) == 1u //
Expand Down Expand Up @@ -11859,7 +11859,7 @@ TOML_NAMESPACE_START
return true;
}

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXTERNAL_LINKAGE
bool array::is_homogeneous(node_type ntype, node * &first_nonmatch) noexcept
{
Expand All @@ -11881,7 +11881,7 @@ TOML_NAMESPACE_START
return true;
}

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXTERNAL_LINKAGE
bool array::is_homogeneous(node_type ntype, const node*& first_nonmatch) const noexcept
{
Expand Down Expand Up @@ -12214,7 +12214,7 @@ TOML_NAMESPACE_START
return true;
}

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXTERNAL_LINKAGE
bool table::is_homogeneous(node_type ntype, node * &first_nonmatch) noexcept
{
Expand All @@ -12237,7 +12237,7 @@ TOML_NAMESPACE_START
return true;
}

TOML_PURE_GETTER
TOML_NODISCARD
TOML_EXTERNAL_LINKAGE
bool table::is_homogeneous(node_type ntype, const node*& first_nonmatch) const noexcept
{
Expand Down

0 comments on commit e2bae9d

Please sign in to comment.