Unconstrained definition of swap
breaks types that pull in other namespaces with swap
#1984
Labels
swap
breaks types that pull in other namespaces with swap
#1984
Using an unconstrained swap function is problematic when interfacing with types that pull in multiple swaps from associated namespaces
consider this godbolt
This is breaking because both swap functions pulled in are ambigous.
One simple way to break this ambiguity is by adding a tie breaking in the form of
std::type_identity_t
. See this godboltThe text was updated successfully, but these errors were encountered: