mirror of
https://github.com/BlackMATov/meta.hpp.git
synced 2025-12-15 03:45:30 +07:00
known issue: crtp
This commit is contained in:
@@ -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);
|
||||
|
||||
24
develop/untests/known_issues/crtp_recursion.cpp
Normal file
24
develop/untests/known_issues/crtp_recursion.cpp
Normal 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>();
|
||||
}
|
||||
Reference in New Issue
Block a user