-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use View instead of Iterator + size #1250
Conversation
This is technically a loss of functionality, as the previous code works with arbitrary ranits but this requires contiguous. I'm strongly Neutral on that so going to ask other maintainers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing to
vcpkg-tool/include/vcpkg/base/util.h
Line 75 in a50687c
void set_duplicates(FwdIt first, FwdIt last, OutIt out, Cmp cmp) |
// the output range out.
template<class Container, class OutIt, class Cmp>
void set_duplicates(const Container& container, OutIt out, Cmp cmp)
{
auto first = container.begin();
const auto last = container.end();
// as before
template<class Container, class OutIt>
void set_duplicates(const Container& container, OutIt out)
{
return set_duplicates(container, out, std::less<>{});
}
Poll: We like this form over what's written?
@ras0219-msft Yes
@JavierMatosD Yes
@vicroms Yes
@BillyONeal No (but ate standard library code for breakfast for 5 years)
@data-queue No preference.
@ras0219-msft specifically asked for Container&& rather than View to avoid needing to name T at the call site.
# Conflicts: # src/vcpkg/postbuildlint.cpp
Thanks! |
No description provided.