Boost logo

Boost :

Subject: Re: [boost] [type_traits] extension has_operator_xxx - conforming to coding guidelines for ICE
From: Frédéric Bron (frederic.bron_at_[hidden])
Date: 2011-02-05 03:34:50


>> I have tried to comply with the coding guidelines for integral
>> constant expressions
>> (http://www.boost.org/development/int_const_guidelines.html).
>
> I personally ignore this page.  It was originally
> written for VC 6 and Borland 5.5 which are both
> pretty much irrelevant at this point.  Unless
> someone can confirm that these problems still
> exist in recent versions of Codegear, I vote that
> we remove this page.

I now comply with all the rules. It seems that VC++ has still some
issues with having logical operators in default values of bool
template parameters.

VC++ yields compile time error with:

template < T, bool B= expr1 and expr2 > struct foo;

When replacing 'and' by '&&' the error disappears.
When replacing 'expr1 and exp2' by 'ice_and<expr1, expr2>::value' it
also works and removes some warnings in g++.

So it seems that this coding requirements are still useful.

New version of the type_traits extension available here:
- vault unix: http://www.boostpro.com/vault/index.php?action=downloadfile&filename=type_traits.tar.bz2&directory=Extension&
- vault dos: http://www.boostpro.com/vault/index.php?action=downloadfile&filename=type_traits-dos.tar.bz2&directory=Extension&
- sandbox: http://svn.boost.org/svn/boost/sandbox/type_traits/

Frédéric


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