Topic: Printing error in 20.3.8 ? Probably not, but where is const_mem_fun?
Author: Michiel.Salters@cmg.nl (Michiel Salters)
Date: Fri, 25 Jan 2002 18:28:19 GMT Raw View
Albrecht Fritzsche <albrecht.fritzsche@alfabet.de> wrote in message news:<3C4FEFD6.4050507@alfabet.de>...
> Ok, now I think that I've understood the wordings incorrectly.
>
> template<class S, class T> mem_fun_t<S, T>
> mem_fun(S (T::*f)());
>
> template<class S, class T> const_mem_fun_t<S, T>
> mem_fun(S (T::*f)() const);
>
> are the two signatures, the identical wording confused me some-
> how. But another question remains - if there are
>
> mem_fun_t/const_mem_fun_t
> mem_fun1_t/const_mem_fun1_t
>
> "pairs", why not a
>
> mem_fun/const_mem_fun
>
> ? Doesn't that seem to contradict some symmetry somehow?
>
> Ali
Yes; there is less symmetry than perhaps possible. Overloading
allows two functions to exist with the same name, while types
require unique names. This fundamental asymmetry causes the
effect you observed. Generic programming almost requires
the overloading, so it's a tradeof between lots of
functionality and a little bit of symmetry.
Regards,
--
Michiel Salters
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]
Author: Albrecht Fritzsche <albrecht.fritzsche@alfabet.de>
Date: Thu, 24 Jan 2002 11:41:59 CST Raw View
Ok, now I think that I've understood the wordings incorrectly.
template<class S, class T> mem_fun_t<S, T>
mem_fun(S (T::*f)());
template<class S, class T> const_mem_fun_t<S, T>
mem_fun(S (T::*f)() const);
are the two signatures, the identical wording confused me some-
how. But another question remains - if there are
mem_fun_t/const_mem_fun_t
mem_fun1_t/const_mem_fun1_t
"pairs", why not a
mem_fun/const_mem_fun
? Doesn't that seem to contradict some symmetry somehow?
Ali
--
Albrecht Fritzsche, Software Developer
alfabet meta-modeling AG,
leibnizstr. 53, 10629 berlin, germany
http://www.alfabet.de
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html ]