xieite::is_satisfied<>

Defined in header <xieite/trait/is_satisfied.hpp>

Specifies that a functor is satisfied by some template arguments.


Definition

template<auto fn, typename... Ts>
concept is_satisfied = requires { fn.template operator()<Ts...>(); };


Example

int main() {
	static constexpr auto same = []<typename T, std::same_as<T>> {};

	xieite::dump(xieite::is_satisfied<same, int, int>);
	xieite::dump(xieite::is_satisfied<same, int, char>);
}
Output:
true
false
[View in Compiler Explorer]