Skip to content

Commit

Permalink
Fix constraints on constructible_from
Browse files Browse the repository at this point in the history
  • Loading branch information
vector-of-bool committed Apr 1, 2024
1 parent a773577 commit c336345
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/neo/concepts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,12 @@ concept destructible = requires {
template <typename T, typename... Args>
concept constructible_from =
destructible<T>
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<T, Args...>
#endif
;

/// Check whether one can static_cast<To>(From)
Expand Down

0 comments on commit c336345

Please sign in to comment.