Boost logo

Boost :

Subject: [boost] [type_erasure]
From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2013-11-26 09:26:40


Hi,
I am trying to use Boost.TypeErasure library with a 'concept' that provides
contextual conversion to *bool*. That is, I want to type-erase types that
provide the following operations for some invented object *o*:

* if (o) {}*

* if (!o) {}*
* bool (o); *

I cannot find a predefined concept for that, nor can I use
BOOST_TYPE_ERASURE_MEMBER or BOOST_TYPE_ERASURE_FREE, because that will not
work for built in types. Is there any convenience tool that enables
specifying such concept?

Regards,
&rzej


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