use uerror in is_invokable_with functions

This commit is contained in:
BlackMATov
2023-02-17 22:29:21 +07:00
parent 72c4d54b60
commit 36e76ccd93
16 changed files with 638 additions and 374 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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>);

View File

@@ -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") {