
On Tue, Mar 25, 2008 at 4:38 AM, Roman Perepelitsa < roman.perepelitsa@gmail.com> wrote:
Ovanes Markarian
writes: Type Lib would help if you would like to distinguish only one type or
Good Luck,Ovanes
On 3/24/08, Robert Dailey
wrote: Thanks, mpl::set is even better, I was going to use mpl::vector, which some special type characteristic. There are some nice traits like: is_same, or is_base_of, or is_fundamental, or is_scalar, or is_integral etc. probably wouldn't have worked.I had a feeling the MPL library would be involved, but I wanted to make sure the type_traits library didn't already have something in place for this kind of situation. Thanks again!
On Mon, Mar 24, 2008 at 3:32 PM, Ovanes Markarian
wrote: If you only have 2 'valid' types then it's easier to use mpl::or_ instead of mpl::set.
#include
#include #include using namespace boost; using namespace boost::mpl;
template<class T> void foo ( T, typename enable_if < or_
, is_same > ::type * = 0 ) { }
HTH, Roman Perepelitsa.
Another great idea :)