Use std::enable_if_t<std::is_constructible_v<T, value_type>> to convert to any type that can be implicitly constructed from an int (which is the value_type of int_set<N>::proxy_reference).
Rationale: this allows assignment-from int_set<N> to any container with int-constructible types (similar as to how this works for std::set<int>). Assignment-to will not work. Also update the example in the README.
Use
std::enable_if_t<std::is_constructible_v<T, value_type>>
to convert to any type that can be implicitly constructed from an int (which is thevalue_type
ofint_set<N>::proxy_reference
).Rationale: this allows assignment-from
int_set<N>
to any container with int-constructible types (similar as to how this works forstd::set<int>
). Assignment-to will not work. Also update the example in the README.