|
Boost : |
From: Jaakko Jarvi (jajarvi_at_[hidden])
Date: 2003-08-28 11:18:26
I've noticed that call_traits doesn't support function references.
I'm not sure whether it makes sense to store function references in
optionals, though, but in any case.
Something like this fails:
typedef void (&afuncref)(int);
typedef call_traits<afunc>::reference t;
The problem is that the call_traits templates have other typedefs in
the same class, e.g. const_reference, which gets instantiated as
well, and it adds the const qualifier to a function type.
GCC doesn't complain, but e.g. Intel does.
Is it still illegal to form a function type with cv-qualifiers, or was
there a DR about that?
Jaakko
In our last exciting episode "Joel de Guzman" wrote:
> Joel de Guzman <djowel_at_[hidden]> wrote:
> > Hi again,
>
> > Take 2:
>
> > typedef typename call_traits<T>::param_type
> > ctor_param;
>
> > typedef typename call_traits<typename
> > remove_reference<T>::type>::param_type assign_param;
>
> > typedef typename call_traits<T>::reference
> > return_type;
>
> > optional(typename call_traits<T>::param_type arg);
> > void reset(assign_param arg);
> > return_type operator*();
> Whoops! That should be:
> optional(ctor_param arg);
> void reset(assign_param arg);
> return_type operator*();
> Anyway, it's the same.
> --
> Joel de Guzman
> http://www.boost-consulting.com
> http://spirit.sf.net
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Best Wishes,
Jaakko Järvi
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk