Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #87

Merged
merged 4 commits into from
Feb 15, 2024
Merged

Dev #87

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions develop/singles/headers/meta.hpp/meta_all.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4772,15 +4772,15 @@ 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>>();
}

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>;
Expand Down Expand Up @@ -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);
Expand Down
24 changes: 24 additions & 0 deletions develop/untests/known_issues/crtp_recursion.cpp
Original file line number Diff line number Diff line change
@@ -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 ([email protected])
******************************************************************************/

#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>();
}
6 changes: 3 additions & 3 deletions headers/meta.hpp/meta_registry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ 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>>();
}

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>;
Expand Down Expand Up @@ -67,7 +67,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);
Expand Down
54 changes: 18 additions & 36 deletions manuals/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
- [Binds](#binds)
- [Classes](#classes-1)
- [Functions](#functions-1)
- [Indices](#indices)
- [Classes](#classes-2)
- [Invoke](#invoke)
- [Functions](#functions-2)
- [Policies](#policies)
- [Namespaces](#namespaces)
- [Registry](#registry)
- [Functions](#functions-3)
- [States](#states)
- [Classes](#classes-3)
- [Classes](#classes-2)
- [Types](#types)
- [Classes](#classes-4)
- [Classes](#classes-3)
- [Enumerations](#enumerations)

# API Reference
Expand Down Expand Up @@ -44,22 +42,22 @@

### Classes

| | |
| ------------------------------------------------ | -------------- |
| [array_bind](./api/binds.md##array_bind) | array_bind |
| [class_bind](./api/binds.md##class_bind) | class_bind |
| [enum_bind](./api/binds.md##enum_bind) | enum_bind |
| [function_bind](./api/binds.md##function_bind) | function_bind |
| [member_bind](./api/binds.md##member_bind) | member_bind |
| [method_bind](./api/binds.md##method_bind) | method_bind |
| [nullptr_bind](./api/binds.md##nullptr_bind) | nullptr_bind |
| [number_bind](./api/binds.md##number_bind) | number_bind |
| [pointer_bind](./api/binds.md##pointer_bind) | pointer_bind |
| [reference_bind](./api/binds.md##reference_bind) | reference_bind |
| [void_bind](./api/binds.md##void_bind) | void_bind |
| [scope_bind](./api/binds.md##scope_bind) | scope_bind |
| [arguments_bind](./api/binds.md##arguments_bind) | arguments_bind |
| [metadata_bind](./api/binds.md##metadata_bind) | metadata_bind |
| | |
| ----------------------------------------------- | -------------- |
| [array_bind](./api/binds.md#array_bind) | array_bind |
| [class_bind](./api/binds.md#class_bind) | class_bind |
| [enum_bind](./api/binds.md#enum_bind) | enum_bind |
| [function_bind](./api/binds.md#function_bind) | function_bind |
| [member_bind](./api/binds.md#member_bind) | member_bind |
| [method_bind](./api/binds.md#method_bind) | method_bind |
| [nullptr_bind](./api/binds.md#nullptr_bind) | nullptr_bind |
| [number_bind](./api/binds.md#number_bind) | number_bind |
| [pointer_bind](./api/binds.md#pointer_bind) | pointer_bind |
| [reference_bind](./api/binds.md#reference_bind) | reference_bind |
| [void_bind](./api/binds.md#void_bind) | void_bind |
| [scope_bind](./api/binds.md#scope_bind) | scope_bind |
| [arguments_bind](./api/binds.md#arguments_bind) | arguments_bind |
| [metadata_bind](./api/binds.md#metadata_bind) | metadata_bind |

### Functions

Expand All @@ -82,22 +80,6 @@
| [arguments_](./api/binds.md#arguments_) | arguments_ |
| [metadata_](./api/binds.md#metadata_) | metadata_ |

## Indices

### Classes

| | |
| ------------------------------------------------------- | ----------------- |
| [argument_index](./api/indices.md#argument_index) | argument_index |
| [constructor_index](./api/indices.md#constructor_index) | constructor_index |
| [destructor_index](./api/indices.md#destructor_index) | destructor_index |
| [evalue_index](./api/indices.md#evalue_index) | evalue_index |
| [function_index](./api/indices.md#function_index) | function_index |
| [member_index](./api/indices.md#member_index) | member_index |
| [method_index](./api/indices.md#method_index) | method_index |
| [scope_index](./api/indices.md#scope_index) | scope_index |
| [variable_index](./api/indices.md#variable_index) | variable_index |

## Invoke

### Functions
Expand Down
176 changes: 0 additions & 176 deletions manuals/api/indices.md

This file was deleted.