types/tagged: use concepts to restrict assignable types

This commit is contained in:
Danny Robson 2020-02-24 14:40:36 +11:00
parent ebd88b25e7
commit 28a7890681

View File

@ -52,6 +52,7 @@ namespace cruft {
//---------------------------------------------------------------------
template <typename InitialT>
requires (cruft::concepts::same_as<std::remove_cvref_t<InitialT>, ValueT> || ...)
tagged (InitialT &&initial)
{
set<InitialT> (std::forward<InitialT> (initial));