Subject: Re: [boost] [typeof] Determining if a type has been registered or not at compile time
From: Peder Holt (peder.holt_at_[hidden])
Date: 2009-12-27 15:41:15
> One way to workaroun this is to allow the user to add a default type:
>> Is this acceptable?
> Yes, that seems the best solution. An excellent idea. Should I create a
> Trac suggestion for it or will you remember to implement it if you decide to
> do it ? If you do this, I think you will want to do it for TYPEOF_TPL also.
> I see much less use for AUTO and AUTO_TPL defaults if the type is not
> registered but I think you should also implement it for these two also both
> to be orthogonal and for the possibility that someone will find a use there
I will remember :)
I am, however, not sure about the proper name for this beast. Also, I am a
bit uncertain about the best behaviour:
I see mainly two options:
typedef BOOST_TYPEOF_WITH_DEFAULT(expression,no_type) deduced_type;
In the second alternative we could simplify the name to
And, yes, I agree that this should be implemented for TPL. Only the first
alternative can be implemented with AUTO...
Another alternative is to implement alternative 1 an then alternative 2 by
using alternative 1. I am still unsure about the name.
BOOST_TYPEOF_WITH_DEFAULT seems a very long name, and not overly descriptive
> Unsubscribe & other changes:
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk