Boost logo

Boost :

From: Steven Watanabe (steven_at_[hidden])
Date: 2007-03-06 20:03:52


Jason Turner <lefticus <at>> writes:

> Learn something new every day, I thought the -> operator could take parameters.

operator-> can be overloaded, but it behaves differently
from all other operators.

struct A {
    void f();
struct B {
    A* operator->() const {
    A* p;

A a;
C c = { &a };
c->f(); //calls a.f();

I can't think of any way to make it do what
you want.

In Christ,
Steven Watanabe

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