Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-07-04 12:03:39


Rob Stewart <stewart_at_[hidden]> writes:

> From: David Abrahams <dave_at_[hidden]>
>> Tobias Schwinger <tschwinger_at_[hidden]> writes:
>>
>> > F is undecorated \
>> > F* is pointer decorated - free or static decoration ("wildcard")
>> > F& is reference decorated /
>> > C::*F is member-pointer-decorated
>> >
>> > The reference shows this grouping, too. Unfortunately the "[/ FIXME: add link to
>> > reference ]" at the point where the "aspect tags" are introduced got lost (because
>> > I copied from the browser instead of my .qbk master file).
>>
>> Okay, I understand. That said, the way you are classifying these
>> things is going to cause confusion. There is no distinction between
>> the types of static member functions and the types of free functions.
>> There is only a distinction in how they are declared; once you are
>> dealing with their types, they are the same thing. The name
>> "free_or_static" carries the implication that you have precise
>> (non-wildcard) tags "free" and "static". In my opinion, you should
>> use the terms "member" and "nonmember." A pointer to a static member
>> function is not a member pointer in the C++ type system; that's why my
>> suggested terminology works. So "free_or_static" should be "nonmember."
>
> No way. "Nonmember" precludes static member functions. They may
> have the same type as nonmember functions, and aren't represented
> with member function pointers, but they are still member functions.

Way. We are not talking about the functions, we're talking about
their types. In other words, the traits do not inspect individual
values of int (*)(int) -- they inspect the type int(*)(int) itself. I
don't think there's any problem with calling int(*)(int) a nonmember
function pointer type.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk