Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2001-03-17 20:49:30


From: David Abrahams <abrahams_at_[hidden]>
> From: "Greg Colvin" <gcolvin_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Saturday, March 17, 2001 10:04 AM
> Subject: Re: [boost] Re: Boost.Threads draft library submission
>
>
> > From: <williamkempf_at_[hidden]>
> > > ... There are
> > > five styles I've seen used, each rubs me wrong for different reasons:
> >
> > Make that six.
> >
> > name: Also commonly used, short, readable, no conflicts.

I meant no conflicts with other uses of the same wart.
If you use the same name for two different entities in
the same scope you lose. So don't do that. Various
warts and naming conventions can help avoid the mistake,
but none are perfect. In template code, as you said,
this-> is the most reliable approach.

> Maybe one:
>
> int f();
>
> template <class T>
> struct B {
> char* f();
> };
>
> template <class T>
> struct X : B<T> {
> void g() {
> char* p = f(); // not B<T>::f!
> }
> };
> int main() {
> X<int> x;
> x.g();
> }
>
>
> List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>


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