Skip to content

Commit 25eb8b2

Browse files
committed
Relax reflection constraints
1 parent 1c7ca60 commit 25eb8b2

4 files changed

Lines changed: 5 additions & 7 deletions

File tree

docs/spec/ProBasicReflection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A type `R` meets the *ProBasicReflection* requirements if the following expressi
77
| Expressions | Semantics |
88
| ---------------------------- | ------------------------------------------------------------ |
99
| `R::is_direct` | A [core constant expression](https://en.cppreference.com/w/cpp/language/constant_expression) of type `bool`, specifying whether the reflection applies to a pointer type itself (`true`), or the element type of a pointer type (`false`). |
10-
| `typename R::reflector_type` | A type that defines the data structure reflected from the type. Shall be *nothrow-default-constructible* and *nothrow-destructible*. |
10+
| `typename R::reflector_type` | A type that defines the data structure reflected from the type. |
1111

1212
## See Also
1313

docs/spec/ProReflection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A type `R` meets the *ProReflection* requirements of a type `P` if `R` meets the
66

77
| Expressions | Semantics |
88
| --------------------------------------------------- | ------------------------------------------------------------ |
9-
| `typename R::reflector_type(std::in_place_type<T>)` | A [core constant expression](https://en.cppreference.com/w/cpp/language/constant_expression) that constructs a value of type `typename R::reflector_type`, reflecting implementation-defined metadata of type `T`. |
9+
| `typename R::reflector_type(std::in_place_type<T>)` | Constructs a value of type `typename R::reflector_type`, reflecting implementation-defined metadata of type `T`. |
1010

1111
## See Also
1212

include/proxy/v4/detail/core.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,7 @@ template <class T, bool IsDirect, class R>
470470
consteval bool is_reflector_well_formed() {
471471
if constexpr (IsDirect) {
472472
if constexpr (std::is_constructible_v<R, std::in_place_type_t<T>>) {
473-
if constexpr (is_consteval([] { return R(std::in_place_type<T>); })) {
474-
return true;
475-
}
473+
return true;
476474
}
477475
} else {
478476
return is_reflector_well_formed<
@@ -745,7 +743,7 @@ struct meta_ptr_indirect_impl {
745743
private:
746744
const M* ptr_;
747745
template <class P>
748-
static constexpr M storage{std::in_place_type<P>};
746+
static inline const M storage{std::in_place_type<P>};
749747
};
750748
template <class M, class DM>
751749
struct meta_ptr_direct_impl : private M {

tests/proxy_traits_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ struct RuntimeReflection {
274274
struct FacadeWithRuntimeReflection : pro::facade_builder //
275275
::add_reflection<RuntimeReflection> //
276276
::build {};
277-
static_assert(!pro::proxiable<MockTrivialPtr, FacadeWithRuntimeReflection>);
277+
static_assert(pro::proxiable<MockTrivialPtr, FacadeWithRuntimeReflection>);
278278

279279
struct FacadeWithTupleLikeConventions {
280280
struct ToStringConvention {

0 commit comments

Comments
 (0)