known issue: crtp

This commit is contained in:
BlackMATov
2024-02-15 10:57:35 +07:00
parent 245f784dfe
commit c64318873e
2 changed files with 27 additions and 3 deletions

View File

@@ -4772,7 +4772,7 @@ namespace meta_hpp
}
template < typename T >
[[nodiscard]] auto resolve_type() {
auto resolve_type() {
using namespace detail;
type_registry& registry = type_registry::instance();
return registry.resolve_by_type<std::remove_cv_t<T>>();
@@ -4780,7 +4780,7 @@ namespace meta_hpp
template < typename T >
// NOLINTNEXTLINE(*-missing-std-forward)
[[nodiscard]] auto resolve_type(T&& from) {
auto resolve_type(T&& from) {
using namespace detail;
using raw_type = std::remove_cvref_t<T>;
@@ -4809,7 +4809,7 @@ namespace meta_hpp
registry.for_each_scope(std::forward<F>(f));
}
[[nodiscard]] inline scope resolve_scope(std::string_view name) {
inline scope resolve_scope(std::string_view name) {
using namespace detail;
state_registry& registry = state_registry::instance();
return registry.resolve_scope(name);

View File

@@ -0,0 +1,24 @@
/*******************************************************************************
* This file is part of the "https://github.com/blackmatov/meta.hpp"
* For conditions of distribution and use, see copyright notice in LICENSE.md
* Copyright (C) 2021-2024, by Matvey Cherevko (blackmatov@gmail.com)
******************************************************************************/
#include <meta.hpp/meta_all.hpp>
#include <doctest/doctest.h>
namespace
{
template < typename Derived >
struct base {};
struct derived : base<derived> {
META_HPP_ENABLE_BASE_INFO(base<derived>)
};
}
TEST_CASE("meta/meta_issues/random/9") {
namespace meta = meta_hpp;
// meta::resolve_type<derived>();
}