mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-16 20:37:03 +03:00
Fix T.65: retrieve copy_trait tag in code example (#2291)
For the tag dispatch to work it is vital to actually use copy_trait's tag.
This commit is contained in:
@@ -18461,7 +18461,7 @@ This is a simplified version of `std::copy` (ignoring the possibility of non-con
|
||||
template<class Iter>
|
||||
Out copy(Iter first, Iter last, Iter out)
|
||||
{
|
||||
using tag_type = typename copy_trait<std::iter_value_t<Iter>>;
|
||||
using tag_type = typename copy_trait<std::iter_value_t<Iter>>::tag;
|
||||
return copy_helper(first, last, out, tag_type{})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user