--
--
---
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposal...@isocpp.org.
To post to this group, send email to std-pr...@isocpp.org.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.
On 2014-01-27 17:45, Billy O'Neal wrote:
> What do you want to happen when T is noncopyable?
Ideally there would exist some form of specialization such that the
method would not exist in that case.
> You can always write your own function that has the semantics you want;
> e.g. value_or_default(Container, Index).
I could write my own implementation of (almost?) anything in STL... that
doesn't mean STL shouldn't include things that are widely useful. IMHO
this qualifies; I've also wished for such a method.
--
Matthew
> You can always write your own function that has the semantics you want;
> e.g. value_or_default(Container, Index).
I could write my own implementation of (almost?) anything in STL... that
doesn't mean STL shouldn't include things that are widely useful. IMHO
this qualifies; I've also wished for such a method.
Exactly. In my view the code looks better when such basic functions are implemented as class members. For comparison: was there any reason why the “at” function added in C++11 can not be implemented externally? I don't think “at” is really much more useful.