Boost logo

Boost :

From: Geurt Vos (G.Vos_at_[hidden])
Date: 2002-02-13 10:17:58


> For instance, this straight-forward example looks great but
> it doesn't work:
>
> > boost::property<
> > boost::read<int,A,&A::get_it>,
> > boost::write<int,A,&A::set_it>
> > > value;
>
> &A::get_it can only be a constant expression if get_it is a
> 'static' member;
> but a static member cannot access a property value.
>

Why isn't &A::get_it (as non-static) a constant expression?
I have to admit I didn't look it up in the standard, but when
I find that every real C++ compiler(*) eats it, I am not tempted
to look it up.

Geurt

*) this time "real C++ compilers" stands for:
Borland C++ 5.5.1
GCC 2.95.3 - 3.0.3
Intel C++ 5.0
Comeau C/C++ 4.2.45.2


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