On Monday, January 2, 2023 at 10:47:28 AM UTC, Bo Persson wrote:
> is_constructible looks for a specific constructor, matching its
> parameters, so is_constructible<S, int> will be true.
>
> If you use just is_constructible<S> that *is* the same as
> is_default_constructible.
Instead of using "is_constructible_v<MyClass,MyOtherClass>", an alternative would be:
#include <utility> // declval
if constexpr ( requires { MyClass( std::declval<MyOtherClass>() ) } ) DoSomething();