mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-13 19:18:01 +07:00
use uerror in is_invokable_with functions
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -128,7 +128,7 @@ namespace
|
||||
[[maybe_unused]]
|
||||
void meta_invoke_function_1(benchmark::State &state) {
|
||||
meta::function f = meta_bench_scope.get_function("static_function_1");
|
||||
META_HPP_ASSERT(f.is_valid());
|
||||
META_HPP_ASSERT(!f.is_empty());
|
||||
|
||||
for ( auto _ : state ) {
|
||||
f(static_angle);
|
||||
@@ -138,7 +138,7 @@ namespace
|
||||
[[maybe_unused]]
|
||||
void meta_invoke_function_2(benchmark::State &state) {
|
||||
meta::function f = meta_bench_scope.get_function("static_function_2");
|
||||
META_HPP_ASSERT(f.is_valid());
|
||||
META_HPP_ASSERT(!f.is_empty());
|
||||
|
||||
for ( auto _ : state ) {
|
||||
f(static_angle, vmath::unit3_x<float>);
|
||||
@@ -148,7 +148,7 @@ namespace
|
||||
[[maybe_unused]]
|
||||
void meta_invoke_function_3(benchmark::State &state) {
|
||||
meta::function f = meta_bench_scope.get_function("static_function_3");
|
||||
META_HPP_ASSERT(f.is_valid());
|
||||
META_HPP_ASSERT(!f.is_empty());
|
||||
|
||||
for ( auto _ : state ) {
|
||||
f(static_angle, vmath::unit3_x<float>, 2.f);
|
||||
@@ -158,7 +158,7 @@ namespace
|
||||
[[maybe_unused]]
|
||||
void meta_invoke_function_4(benchmark::State &state) {
|
||||
meta::function f = meta_bench_scope.get_function("static_function_4");
|
||||
META_HPP_ASSERT(f.is_valid());
|
||||
META_HPP_ASSERT(!f.is_empty());
|
||||
|
||||
for ( auto _ : state ) {
|
||||
f(static_angle, vmath::unit3_x<float>, 2.f, vmath::midentity3<float>);
|
||||
|
||||
@@ -59,6 +59,13 @@ TEST_CASE("meta/meta_states/dtor") {
|
||||
|
||||
CHECK(dtor.get_type().get_owner_type() == meta::resolve_type<clazz_opened_dtor>());
|
||||
CHECK(dtor.get_type().get_flags() == meta::destructor_flags::is_noexcept);
|
||||
|
||||
CHECK(dtor.is_invocable_with<clazz_opened_dtor*>());
|
||||
CHECK(dtor.is_invocable_with(meta::make_uvalue<clazz_opened_dtor*>(nullptr)));
|
||||
|
||||
CHECK_FALSE(dtor.is_invocable_with<clazz_opened_dtor>());
|
||||
CHECK_FALSE(dtor.is_invocable_with<clazz_closed_dtor*>());
|
||||
CHECK_FALSE(dtor.is_invocable_with<const clazz_opened_dtor*>());
|
||||
}
|
||||
|
||||
SUBCASE("virtual_dtor") {
|
||||
|
||||
Reference in New Issue
Block a user