Boost logo

Boost :

From: joel de guzman (isis-tech_at_[hidden])
Date: 2001-06-28 21:29:54


----- Original Message -----
From: "Beman Dawes" <bdawes_at_[hidden]>
To: <boost_at_[hidden]>; <boost_at_[hidden]>
Sent: Friday, June 29, 2001 9:11 AM
Subject: Re: Tuple/Lambda indexing (was Re: [boost] Re: Tuple library
accepted)

> At 08:44 PM 6/28/2001, John Max Skaller wrote:
>
> >joel de guzman wrote:
> >
> >> Also, since we are dealing with static constants, we can do something
> >> like const int _1st = 0, const int _2nd = 1 etc. for those who prefer
> to
> >> think
> >> in terms of elements vs. indexes.
> >
> > Aha!
> >
> > x[_1st] // x[0]
> >
> >Everyone can be happy now.
>
> That's the hope:-)
>
> Gary, Jaakko?
>
> --Beman

Yes, these utility constants would be quite useful in many more
applications. If possible, I would like to see a separate header file
for these constants. Here are a couple more I find useful in interfaces
that I write:

struct More {};
const More more = More();

struct Last {};
const Last last = Last();

struct Default{};
const Default default= Default();

struct Null {};
const Null null = Null(); // the dreaded null/nil... Has this been
resolved yet?

Cheers,
Joel de Guzman


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