From bff179fac5f96052057177b4b3826ae9f1ffb8a4 Mon Sep 17 00:00:00 2001 From: BlackMATov Date: Fri, 13 Jan 2023 14:13:54 +0700 Subject: [PATCH] tests cleanup --- .github/workflows/darwin.yml | 4 +- .github/workflows/linux.yml | 4 +- develop/singles/headers/meta.hpp/meta_all.hpp | 44 +++++++++---------- .../untests/meta_features/diamond_tests.cpp | 4 +- .../untests/meta_states/function_tests.cpp | 2 +- .../untests/meta_states/metadata_tests.cpp | 4 +- develop/untests/meta_states/method_tests.cpp | 8 ++-- develop/untests/meta_types/any_type_tests.cpp | 2 +- .../untests/meta_types/class_type_tests.cpp | 2 +- develop/untests/meta_utilities/arg2_tests.cpp | 12 ++--- develop/untests/meta_utilities/arg3_tests.cpp | 8 ++-- develop/untests/meta_utilities/hash_tests.cpp | 4 +- .../untests/meta_utilities/value2_tests.cpp | 24 ++++------ .../untests/meta_utilities/value4_tests.cpp | 4 -- .../untests/meta_utilities/value_tests.cpp | 24 +++++----- headers/meta.hpp/meta_binds/class_bind.hpp | 14 +++--- headers/meta.hpp/meta_binds/scope_bind.hpp | 6 +-- .../meta.hpp/meta_indices/evalue_index.hpp | 4 +- .../meta.hpp/meta_indices/function_index.hpp | 4 +- .../meta.hpp/meta_indices/member_index.hpp | 4 +- .../meta.hpp/meta_indices/method_index.hpp | 4 +- headers/meta.hpp/meta_indices/scope_index.hpp | 4 +- .../meta.hpp/meta_indices/variable_index.hpp | 4 +- 23 files changed, 91 insertions(+), 103 deletions(-) diff --git a/.github/workflows/darwin.yml b/.github/workflows/darwin.yml index 3193be9..f870d2d 100644 --- a/.github/workflows/darwin.yml +++ b/.github/workflows/darwin.yml @@ -16,7 +16,9 @@ jobs: name: "xcode-${{matrix.config.xcode}}" steps: - name: Setup - run: brew install cmake ninja + run: | + brew update + brew install cmake ninja - name: Checkout uses: actions/checkout@v3 with: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2c934cc..11285f6 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -17,7 +17,9 @@ jobs: name: "${{matrix.config.cxx}}" steps: - name: Setup - run: sudo apt-get -y install cmake ninja-build ${{matrix.config.cc}} ${{matrix.config.cxx}} + run: | + sudo apt-get update -o Acquire::Retries=10 + sudo apt-get install -o Acquire::Retries=10 -y cmake ninja-build ${{matrix.config.cc}} ${{matrix.config.cxx}} - name: Checkout uses: actions/checkout@v3 with: diff --git a/develop/singles/headers/meta.hpp/meta_all.hpp b/develop/singles/headers/meta.hpp/meta_all.hpp index 37cea4a..17229c2 100644 --- a/develop/singles/headers/meta.hpp/meta_all.hpp +++ b/develop/singles/headers/meta.hpp/meta_all.hpp @@ -4075,7 +4075,7 @@ namespace meta_hpp template < typename... Args, constructor_policy_kind Policy > class_bind& class_bind::constructor_( constructor_opts opts, - [[maybe_unused]] Policy policy) + Policy) requires detail::class_bind_constructor_kind { auto state = detail::constructor_state::make(std::move(opts.metadata)); @@ -4134,7 +4134,7 @@ namespace meta_hpp std::string name, Function function, function_opts opts, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::function_state::make( std::move(name), @@ -4161,7 +4161,7 @@ namespace meta_hpp std::string name, Function function, std::initializer_list arguments, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::function_state::make( std::move(name), @@ -4203,7 +4203,7 @@ namespace meta_hpp std::string name, Member member, member_opts opts, - [[maybe_unused]] Policy policy) + Policy) requires detail::class_bind_member_kind { auto state = detail::member_state::make( @@ -4235,7 +4235,7 @@ namespace meta_hpp std::string name, Method method, method_opts opts, - [[maybe_unused]] Policy policy) + Policy) requires detail::class_bind_method_kind { auto state = detail::method_state::make( @@ -4263,7 +4263,7 @@ namespace meta_hpp std::string name, Method method, std::initializer_list arguments, - [[maybe_unused]] Policy policy) + Policy) requires detail::class_bind_method_kind { auto state = detail::method_state::make( @@ -4316,7 +4316,7 @@ namespace meta_hpp std::string name, Pointer pointer, variable_opts opts, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::variable_state::make( std::move(name), @@ -4486,7 +4486,7 @@ namespace meta_hpp std::string name, Function function, function_opts opts, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::function_state::make( std::move(name), @@ -4512,7 +4512,7 @@ namespace meta_hpp std::string name, Function function, std::initializer_list arguments, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::function_state::make( std::move(name), @@ -4561,7 +4561,7 @@ namespace meta_hpp std::string name, Pointer pointer, variable_opts opts, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::variable_state::make( std::move(name), @@ -4708,11 +4708,11 @@ namespace meta_hpp } inline bool operator<(const evalue_index& l, const evalue_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const evalue_index& l, const evalue_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const evalue_index& l, const evalue_index& r) noexcept { @@ -4744,11 +4744,11 @@ namespace meta_hpp } inline bool operator<(const function_index& l, const function_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const function_index& l, const function_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const function_index& l, const function_index& r) noexcept { @@ -4780,11 +4780,11 @@ namespace meta_hpp } inline bool operator<(const member_index& l, const member_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const member_index& l, const member_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const member_index& l, const member_index& r) noexcept { @@ -4816,11 +4816,11 @@ namespace meta_hpp } inline bool operator<(const method_index& l, const method_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const method_index& l, const method_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const method_index& l, const method_index& r) noexcept { @@ -4846,11 +4846,11 @@ namespace meta_hpp } inline bool operator<(const scope_index& l, const scope_index& r) noexcept { - return l.name_ < r.name_; + return std::less<>{}(l.name_, r.name_); } inline bool operator==(const scope_index& l, const scope_index& r) noexcept { - return l.name_ == r.name_; + return std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const scope_index& l, const scope_index& r) noexcept { @@ -4882,11 +4882,11 @@ namespace meta_hpp } inline bool operator<(const variable_index& l, const variable_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const variable_index& l, const variable_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const variable_index& l, const variable_index& r) noexcept { diff --git a/develop/untests/meta_features/diamond_tests.cpp b/develop/untests/meta_features/diamond_tests.cpp index 8c1f525..fe86cf4 100644 --- a/develop/untests/meta_features/diamond_tests.cpp +++ b/develop/untests/meta_features/diamond_tests.cpp @@ -11,8 +11,8 @@ namespace struct A { A() = default; - [[maybe_unused]] A(A&&) = default; - [[maybe_unused]]A(const A&) = default; + A(A&&) = default; + A(const A&) = default; A& operator=(A&&) = delete; A& operator=(const A&) = delete; diff --git a/develop/untests/meta_states/function_tests.cpp b/develop/untests/meta_states/function_tests.cpp index 56c6080..f547f78 100644 --- a/develop/untests/meta_states/function_tests.cpp +++ b/develop/untests/meta_states/function_tests.cpp @@ -27,7 +27,7 @@ namespace static int arg_unbounded_const_arr(const ivec2 vs[]) { return vs[0].x + vs[0].y + vs[1].x + vs[1].y; } }; - [[maybe_unused]] bool operator==(const ivec2& l, const ivec2& r) noexcept { + bool operator==(const ivec2& l, const ivec2& r) noexcept { return l.x == r.x && l.y == r.y; } } diff --git a/develop/untests/meta_states/metadata_tests.cpp b/develop/untests/meta_states/metadata_tests.cpp index a0e5a89..ae38bbf 100644 --- a/develop/untests/meta_states/metadata_tests.cpp +++ b/develop/untests/meta_states/metadata_tests.cpp @@ -18,8 +18,8 @@ namespace int x{}; int y{}; - [[maybe_unused]] explicit ivec2(int nv) : x{nv}, y{nv} {} - [[maybe_unused]] ivec2(int nx, int ny) : x{nx}, y{ny} {} + explicit ivec2(int nv) : x{nv}, y{nv} {} + ivec2(int nx, int ny) : x{nx}, y{ny} {} ivec2& add(const ivec2& other) noexcept { x += other.x; diff --git a/develop/untests/meta_states/method_tests.cpp b/develop/untests/meta_states/method_tests.cpp index cabb4ad..5ab15f3 100644 --- a/develop/untests/meta_states/method_tests.cpp +++ b/develop/untests/meta_states/method_tests.cpp @@ -14,16 +14,16 @@ namespace struct base { base() = default; - [[maybe_unused]] base(base&&) = default; - [[maybe_unused]] base(const base&) = default; + base(base&&) = default; + base(const base&) = default; virtual ~base() = default; virtual int pure_virtual_method() = 0; }; struct clazz : base { clazz() = default; - [[maybe_unused]] clazz(clazz&&) = default; - [[maybe_unused]] clazz(const clazz&) = default; + clazz(clazz&&) = default; + clazz(const clazz&) = default; // diff --git a/develop/untests/meta_types/any_type_tests.cpp b/develop/untests/meta_types/any_type_tests.cpp index 6a4e50b..905b139 100644 --- a/develop/untests/meta_types/any_type_tests.cpp +++ b/develop/untests/meta_types/any_type_tests.cpp @@ -10,7 +10,7 @@ namespace { struct class_t { class_t() = default; - [[maybe_unused]] class_t(int i): member_v{i} {} + class_t(int i): member_v{i} {} int member_v{}; void method_v() {} diff --git a/develop/untests/meta_types/class_type_tests.cpp b/develop/untests/meta_types/class_type_tests.cpp index 6674908..fb15c1b 100644 --- a/develop/untests/meta_types/class_type_tests.cpp +++ b/develop/untests/meta_types/class_type_tests.cpp @@ -39,7 +39,7 @@ namespace float base_clazz_2::base_variable_2 = 2.0f; struct derived_clazz : base_clazz_1, base_clazz_2 { - [[maybe_unused]] derived_clazz(int i, float f) + derived_clazz(int i, float f) : base_clazz_1{i} , base_clazz_2{f} {} diff --git a/develop/untests/meta_utilities/arg2_tests.cpp b/develop/untests/meta_utilities/arg2_tests.cpp index 3046c5c..37741b6 100644 --- a/develop/untests/meta_utilities/arg2_tests.cpp +++ b/develop/untests/meta_utilities/arg2_tests.cpp @@ -12,14 +12,14 @@ namespace A() = default; virtual ~A() = default; - [[maybe_unused]] A(A&&) noexcept { ++move_ctors_; } - [[maybe_unused]] A(const A&) { ++copy_ctors_; } + A(A&&) noexcept { ++move_ctors_; } + A(const A&) { ++copy_ctors_; } A& operator=(A&&) = delete; A& operator=(const A&) = delete; int i = 1; - [[maybe_unused, nodiscard]] int f() const { return i; } + [[nodiscard]] int f() const { return i; } static int copy_ctors_; static int move_ctors_; @@ -30,17 +30,17 @@ namespace struct B : virtual A { int bi = 2; - [[maybe_unused, nodiscard]] int f() const { return bi; } + [[nodiscard]] int f() const { return bi; } }; struct C : virtual A { int ci = 3; - [[maybe_unused, nodiscard]] int f() const { return ci; } + [[nodiscard]] int f() const { return ci; } }; struct D : B, C { int di = 4; - [[maybe_unused, nodiscard]] int f() const { return di; } + [[nodiscard]] int f() const { return di; } }; } diff --git a/develop/untests/meta_utilities/arg3_tests.cpp b/develop/untests/meta_utilities/arg3_tests.cpp index 31ba4b4..6f795ef 100644 --- a/develop/untests/meta_utilities/arg3_tests.cpp +++ b/develop/untests/meta_utilities/arg3_tests.cpp @@ -18,22 +18,22 @@ namespace A& operator=(const A&) = delete; int i = 1; - [[maybe_unused, nodiscard]] int f() const { return i; } + [[nodiscard]] int f() const { return i; } }; struct B : virtual A { int bi = 2; - [[maybe_unused, nodiscard]] int f() const { return bi; } + [[nodiscard]] int f() const { return bi; } }; struct C : virtual A { int ci = 3; - [[maybe_unused, nodiscard]] int f() const { return ci; } + [[nodiscard]] int f() const { return ci; } }; struct D : B, C { int di = 4; - [[maybe_unused, nodiscard]] int f() const { return di; } + [[nodiscard]] int f() const { return di; } }; } diff --git a/develop/untests/meta_utilities/hash_tests.cpp b/develop/untests/meta_utilities/hash_tests.cpp index 00abbc2..f9ad500 100644 --- a/develop/untests/meta_utilities/hash_tests.cpp +++ b/develop/untests/meta_utilities/hash_tests.cpp @@ -20,8 +20,8 @@ namespace int x{}; int y{}; - [[maybe_unused]] explicit ivec2(int nv) : x{nv}, y{nv} {} - [[maybe_unused]] ivec2(int nx, int ny) : x{nx}, y{ny} {} + explicit ivec2(int nv) : x{nv}, y{nv} {} + ivec2(int nx, int ny) : x{nx}, y{ny} {} ivec2& add(const ivec2& other) noexcept { x += other.x; diff --git a/develop/untests/meta_utilities/value2_tests.cpp b/develop/untests/meta_utilities/value2_tests.cpp index 5dced60..4f28975 100644 --- a/develop/untests/meta_utilities/value2_tests.cpp +++ b/develop/untests/meta_utilities/value2_tests.cpp @@ -14,10 +14,10 @@ namespace ivec2() = delete; - [[maybe_unused]] explicit ivec2(int nv): x{nv}, y{nv} {} - [[maybe_unused]] ivec2(int nx, int ny): x{nx}, y{ny} {} + explicit ivec2(int nv): x{nv}, y{nv} {} + ivec2(int nx, int ny): x{nx}, y{ny} {} - [[maybe_unused]] ivec2(ivec2&& other) noexcept + ivec2(ivec2&& other) noexcept : x{other.x} , y{other.y} { other.x = 0; @@ -25,7 +25,7 @@ namespace ++move_constructor_counter; } - [[maybe_unused]] ivec2(const ivec2& other) noexcept + ivec2(const ivec2& other) noexcept : x{other.x} , y{other.y} { ++copy_constructor_counter; @@ -51,10 +51,10 @@ namespace ivec2_big() = delete; - [[maybe_unused]] explicit ivec2_big(int nv): x{nv}, y{nv} {} - [[maybe_unused]] ivec2_big(int nx, int ny): x{nx}, y{ny} {} + explicit ivec2_big(int nv): x{nv}, y{nv} {} + ivec2_big(int nx, int ny): x{nx}, y{ny} {} - [[maybe_unused]] ivec2_big(ivec2_big&& other) noexcept + ivec2_big(ivec2_big&& other) noexcept : x{other.x} , y{other.y} { other.x = 0; @@ -62,7 +62,7 @@ namespace ++move_constructor_counter; } - [[maybe_unused]] ivec2_big(const ivec2_big& other) noexcept + ivec2_big(const ivec2_big& other) noexcept : x{other.x} , y{other.y} { ++copy_constructor_counter; @@ -80,14 +80,6 @@ namespace static int copy_constructor_counter; }; - [[maybe_unused]] bool operator==(const ivec2& l, const ivec2& r) noexcept { - return l.x == r.x && l.y == r.y; - } - - [[maybe_unused]] bool operator==(const ivec2_big& l, const ivec2_big& r) noexcept { - return l.x == r.x && l.y == r.y; - } - int ivec2::destructor_counter{0}; int ivec2::move_constructor_counter{0}; int ivec2::copy_constructor_counter{0}; diff --git a/develop/untests/meta_utilities/value4_tests.cpp b/develop/untests/meta_utilities/value4_tests.cpp index f726633..87f6a4f 100644 --- a/develop/untests/meta_utilities/value4_tests.cpp +++ b/develop/untests/meta_utilities/value4_tests.cpp @@ -11,24 +11,20 @@ namespace struct clazz_throw_dtor { int i{}; - [[maybe_unused]] clazz_throw_dtor() { ++constructor_counter; } - [[maybe_unused]] clazz_throw_dtor(int ni) : i{ni} { ++constructor_counter; } - [[maybe_unused]] clazz_throw_dtor(clazz_throw_dtor&& other) : i{other.i} { other.i = 0; ++move_constructor_counter; } - [[maybe_unused]] clazz_throw_dtor(const clazz_throw_dtor& other) : i{other.i} { ++copy_constructor_counter; diff --git a/develop/untests/meta_utilities/value_tests.cpp b/develop/untests/meta_utilities/value_tests.cpp index b620385..d93c25d 100644 --- a/develop/untests/meta_utilities/value_tests.cpp +++ b/develop/untests/meta_utilities/value_tests.cpp @@ -16,10 +16,10 @@ namespace ivec2() = delete; - [[maybe_unused]] explicit ivec2(int nv): x{nv}, y{nv} {} - [[maybe_unused]] ivec2(int nx, int ny): x{nx}, y{ny} {} + explicit ivec2(int nv): x{nv}, y{nv} {} + ivec2(int nx, int ny): x{nx}, y{ny} {} - [[maybe_unused]] ivec2(ivec2&& other) noexcept + ivec2(ivec2&& other) noexcept : x{other.x} , y{other.y} { other.x = 0; @@ -27,7 +27,7 @@ namespace ++move_constructor_counter; } - [[maybe_unused]] ivec2(const ivec2& other) noexcept + ivec2(const ivec2& other) noexcept : x{other.x} , y{other.y} { ++copy_constructor_counter; @@ -53,8 +53,8 @@ namespace ivec3() = delete; - [[maybe_unused]] explicit ivec3(int nv): x{nv}, y{nv}, z{nv} {} - [[maybe_unused]] ivec3(int nx, int ny, int nz): x{nx}, y{ny}, z{nz} {} + explicit ivec3(int nv): x{nv}, y{nv}, z{nv} {} + ivec3(int nx, int ny, int nz): x{nx}, y{ny}, z{nz} {} }; int ivec2::move_constructor_counter{0}; @@ -64,11 +64,7 @@ namespace return {l.x + r.x, l.y + r.y}; } - [[maybe_unused]] bool operator<(const ivec2& l, const ivec2& r) noexcept { - return (l.x < r.x) || (l.x == r.x && l.y < r.y); - } - - [[maybe_unused]] bool operator==(const ivec2& l, const ivec2& r) noexcept { + bool operator==(const ivec2& l, const ivec2& r) noexcept { return l.x == r.x && l.y == r.y; } } @@ -429,15 +425,15 @@ TEST_CASE("meta/meta_utilities/value") { CHECK(ivec2::move_constructor_counter == 0); CHECK(ivec2::copy_constructor_counter == 0); - [[maybe_unused]] meta::uvalue vv1{*vp}; + meta::uvalue vv1{*vp}; CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 1 || ivec2::move_constructor_counter == 2)); CHECK(ivec2::copy_constructor_counter == 1); - [[maybe_unused]] meta::uvalue vv2{*std::move(vp)}; + meta::uvalue vv2{*std::move(vp)}; CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 2 || ivec2::move_constructor_counter == 4)); CHECK(ivec2::copy_constructor_counter == 2); - [[maybe_unused]] meta::uvalue vv3{*std::as_const(vp)}; + meta::uvalue vv3{*std::as_const(vp)}; CHECK((ivec2::move_constructor_counter == 0 || ivec2::move_constructor_counter == 3 || ivec2::move_constructor_counter == 6)); CHECK(ivec2::copy_constructor_counter == 3); } diff --git a/headers/meta.hpp/meta_binds/class_bind.hpp b/headers/meta.hpp/meta_binds/class_bind.hpp index 84c86b4..1c8c2c3 100644 --- a/headers/meta.hpp/meta_binds/class_bind.hpp +++ b/headers/meta.hpp/meta_binds/class_bind.hpp @@ -74,7 +74,7 @@ namespace meta_hpp template < typename... Args, constructor_policy_kind Policy > class_bind& class_bind::constructor_( constructor_opts opts, - [[maybe_unused]] Policy policy) + Policy) requires detail::class_bind_constructor_kind { auto state = detail::constructor_state::make(std::move(opts.metadata)); @@ -133,7 +133,7 @@ namespace meta_hpp std::string name, Function function, function_opts opts, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::function_state::make( std::move(name), @@ -160,7 +160,7 @@ namespace meta_hpp std::string name, Function function, std::initializer_list arguments, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::function_state::make( std::move(name), @@ -202,7 +202,7 @@ namespace meta_hpp std::string name, Member member, member_opts opts, - [[maybe_unused]] Policy policy) + Policy) requires detail::class_bind_member_kind { auto state = detail::member_state::make( @@ -234,7 +234,7 @@ namespace meta_hpp std::string name, Method method, method_opts opts, - [[maybe_unused]] Policy policy) + Policy) requires detail::class_bind_method_kind { auto state = detail::method_state::make( @@ -262,7 +262,7 @@ namespace meta_hpp std::string name, Method method, std::initializer_list arguments, - [[maybe_unused]] Policy policy) + Policy) requires detail::class_bind_method_kind { auto state = detail::method_state::make( @@ -315,7 +315,7 @@ namespace meta_hpp std::string name, Pointer pointer, variable_opts opts, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::variable_state::make( std::move(name), diff --git a/headers/meta.hpp/meta_binds/scope_bind.hpp b/headers/meta.hpp/meta_binds/scope_bind.hpp index 7064ead..e401fe1 100644 --- a/headers/meta.hpp/meta_binds/scope_bind.hpp +++ b/headers/meta.hpp/meta_binds/scope_bind.hpp @@ -42,7 +42,7 @@ namespace meta_hpp std::string name, Function function, function_opts opts, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::function_state::make( std::move(name), @@ -68,7 +68,7 @@ namespace meta_hpp std::string name, Function function, std::initializer_list arguments, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::function_state::make( std::move(name), @@ -117,7 +117,7 @@ namespace meta_hpp std::string name, Pointer pointer, variable_opts opts, - [[maybe_unused]] Policy policy) + Policy) { auto state = detail::variable_state::make( std::move(name), diff --git a/headers/meta.hpp/meta_indices/evalue_index.hpp b/headers/meta.hpp/meta_indices/evalue_index.hpp index 5412f1b..525a615 100644 --- a/headers/meta.hpp/meta_indices/evalue_index.hpp +++ b/headers/meta.hpp/meta_indices/evalue_index.hpp @@ -35,11 +35,11 @@ namespace meta_hpp } inline bool operator<(const evalue_index& l, const evalue_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const evalue_index& l, const evalue_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const evalue_index& l, const evalue_index& r) noexcept { diff --git a/headers/meta.hpp/meta_indices/function_index.hpp b/headers/meta.hpp/meta_indices/function_index.hpp index dc63ac7..bddcf11 100644 --- a/headers/meta.hpp/meta_indices/function_index.hpp +++ b/headers/meta.hpp/meta_indices/function_index.hpp @@ -35,11 +35,11 @@ namespace meta_hpp } inline bool operator<(const function_index& l, const function_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const function_index& l, const function_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const function_index& l, const function_index& r) noexcept { diff --git a/headers/meta.hpp/meta_indices/member_index.hpp b/headers/meta.hpp/meta_indices/member_index.hpp index be3837e..b4fcd65 100644 --- a/headers/meta.hpp/meta_indices/member_index.hpp +++ b/headers/meta.hpp/meta_indices/member_index.hpp @@ -35,11 +35,11 @@ namespace meta_hpp } inline bool operator<(const member_index& l, const member_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const member_index& l, const member_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const member_index& l, const member_index& r) noexcept { diff --git a/headers/meta.hpp/meta_indices/method_index.hpp b/headers/meta.hpp/meta_indices/method_index.hpp index 8b5ce30..341f5ba 100644 --- a/headers/meta.hpp/meta_indices/method_index.hpp +++ b/headers/meta.hpp/meta_indices/method_index.hpp @@ -35,11 +35,11 @@ namespace meta_hpp } inline bool operator<(const method_index& l, const method_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const method_index& l, const method_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const method_index& l, const method_index& r) noexcept { diff --git a/headers/meta.hpp/meta_indices/scope_index.hpp b/headers/meta.hpp/meta_indices/scope_index.hpp index 3652d44..dad291b 100644 --- a/headers/meta.hpp/meta_indices/scope_index.hpp +++ b/headers/meta.hpp/meta_indices/scope_index.hpp @@ -29,11 +29,11 @@ namespace meta_hpp } inline bool operator<(const scope_index& l, const scope_index& r) noexcept { - return l.name_ < r.name_; + return std::less<>{}(l.name_, r.name_); } inline bool operator==(const scope_index& l, const scope_index& r) noexcept { - return l.name_ == r.name_; + return std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const scope_index& l, const scope_index& r) noexcept { diff --git a/headers/meta.hpp/meta_indices/variable_index.hpp b/headers/meta.hpp/meta_indices/variable_index.hpp index f18bbf4..2dad469 100644 --- a/headers/meta.hpp/meta_indices/variable_index.hpp +++ b/headers/meta.hpp/meta_indices/variable_index.hpp @@ -35,11 +35,11 @@ namespace meta_hpp } inline bool operator<(const variable_index& l, const variable_index& r) noexcept { - return l.type_ < r.type_ || (l.type_ == r.type_ && l.name_ < r.name_); + return l.type_ < r.type_ || (l.type_ == r.type_ && std::less<>{}(l.name_, r.name_)); } inline bool operator==(const variable_index& l, const variable_index& r) noexcept { - return l.type_ == r.type_ && l.name_ == r.name_; + return l.type_ == r.type_ && std::equal_to<>{}(l.name_, r.name_); } inline bool operator!=(const variable_index& l, const variable_index& r) noexcept {