Boost logo

Boost :

Subject: Re: [boost] [RFC] Protocol for operator. (dot) overloading
From: Corrado Zoccolo (czoccolo_at_[hidden])
Date: 2008-10-06 11:23:53

Hi Matias, <>

On Mon, Oct 6, 2008 at 2:02 AM, Mathias Gaunard <
mathias.gaunard_at_[hidden]> wrote:

> Such a complicated and specific mechanism.
> I think a lot of people come up with lots of approaches at overloading the
> dot operator which really do not truly overload its meaning.

actually, my proposal approximates in current C++ Gary Powell's, Doug
Gregor's and Jaakko Jaarvi's proposal (see WG21/N1671), and is inline with
Stroustrup's initial idea of what overloading operator. would be in C++, if
it was allowed (see:>,
or D&E).

> What that operator takes is an an object, a name, and arguments. Therefore,
> in my opinion, overloading the dot operator should mean calling a function
> with a compile-time string and those arguments. Then, with proper
> compile-time introspection support (an mpl map of compile-time strings to
> functor types), one can for example choose to call a member function with
> that name on some type, or do something else.

This idea is nice, but it introduces an asymmetry with how operator -> is
handled. Moreover, the same counter arguments as those for not overloading
operator :: (scope resolution) hold (see:>).


> _______________________________________________
> Unsubscribe & other changes:

dott. Corrado Zoccolo                          mailto:czoccolo_at_[hidden]
PhD - Department of Computer Science - University of Pisa, Italy

Boost list run by bdawes at, gregod at, cpdaniel at, john at