Topic: Purpose of value_comp in associative containers
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.com>
Date: Wed, 7 Apr 2010 15:13:52 CST Raw View
On 6 Apr., 22:10, Edward Diener <eldie...@tropicsoft.invalid> wrote:
> What is the purpose of value_comp in associative containers ? Is it ever
> supposed to be used for anything in associative conatiners as opposed to the
> key_comp ?
I don't think that value_comp is something which is really
necessary, but it is too late to remove it now. Library issue
1296 discussed the need for it or the chance to make it
unspecified, but it is API we must live with, so it became
an NAD issue.
HTH & Greetings from Bremen,
Daniel Kr gler
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: Edward Diener <eldiener@tropicsoft.invalid>
Date: Thu, 8 Apr 2010 12:36:32 CST Raw View
On 4/7/2010 5:13 PM, Daniel Kr=FCgler wrote:
> On 6 Apr., 22:10, Edward Diener<eldie...@tropicsoft.invalid> wrote:
>
>> What is the purpose of value_comp in associative containers ? Is it ever
>> supposed to be used for anything in associative conatiners as opposed to
>> the
>> key_comp ?
>>
>
> I don't think that value_comp is something which is really
> necessary, but it is too late to remove it now. Library issue
> 1296 discussed the need for it or the chance to make it
> unspecified, but it is API we must live with, so it became
> an NAD issue.
>
Library issue 1296 does not specified for what it is needed. As I understan=
d
it, you are saying that it was originally specified even though it has no
real use. I can accept that but I am still curious as to why it was
originally specified.
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use
mailto:std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@googlemail.com>
Date: Thu, 8 Apr 2010 18:18:06 CST Raw View
On 8 Apr., 20:36, Edward Diener <eldie...@tropicsoft.invalid> wrote:
> On 4/7/2010 5:13 PM, Daniel Kr=FCgler wrote:
>
> > On 6 Apr., 22:10, Edward Diener<eldie...@tropicsoft.invalid> wrote:
>
> >> What is the purpose of value_comp in associative containers ? Is it ever
> >> supposed to be used for anything in associative conatiners as opposed to
> >> the
> >> key_comp ?
>
> > I don't think that value_comp is something which is really
> > necessary, but it is too late to remove it now. Library issue
> > 1296 discussed the need for it or the chance to make it
> > unspecified, but it is API we must live with, so it became
> > an NAD issue.
>
> Library issue 1296 does not specified for what it is needed. As I understan=
> d
> it, you are saying that it was originally specified even though it has no
> real use. I can accept that but I am still curious as to why it was
> originally specified.
Sorry, I should have added this in my original reply: I *think*
the reason is that the construction of value_comp did help
specifying semantics (see e.g. Associative container requirements
or [associative.reqmts]/10+11), and these semantics are
sometimes also useful in user-code, e.g. with the set algorithms.
HTH & Greetings from Bremen,
Daniel Kr gler
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@netlab.cs.rpi.edu]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]
Author: Edward Diener <eldiener@tropicsoft.invalid>
Date: Tue, 6 Apr 2010 14:10:01 CST Raw View
What is the purpose of value_comp in associative containers ? Is it ever
supposed to be used for anything in associative conatiners as opposed to the
key_comp ?
--
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use
mailto:std-c++@netlab.cs.rpi.edu<std-c%2B%2B@netlab.cs.rpi.edu>
]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.comeaucomputing.com/csc/faq.html ]