From c336345cd93d1553e3a4c6a2f0ace4be2d7ad78b Mon Sep 17 00:00:00 2001 From: vector-of-bool Date: Mon, 1 Apr 2024 00:39:21 -0600 Subject: [PATCH] Fix constraints on constructible_from --- src/neo/concepts.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/neo/concepts.hpp b/src/neo/concepts.hpp index e278e93..1a90ebe 100644 --- a/src/neo/concepts.hpp +++ b/src/neo/concepts.hpp @@ -45,7 +45,12 @@ concept destructible = requires { template concept constructible_from = destructible - and requires(Args&&... args) { T(NEO_FWD(args)...); } + and requires(Args&&... args) { T((Args&&)(args)...); } + #if NEO_HAS_BUILTIN(__is_constructible) + and __is_constructible(T, Args...) + #else + and std::is_constructible_v + #endif ; /// Check whether one can static_cast(From)