
Jody Hagins wrote:
The coding guidelines document (boost/more/int_const_guidelines.htm), states the following...
Always use a fully qualified name to refer to an integral constant expression.
For example:
typedef myclass< ::boost::is_integral<some_type>::value> mytypedef;
Rationale: at least one compiler (Borland's), doesn't recognise the name of a constant as an integral constant expression unless the name is fully qualified (which is to say it starts with ::).
However, it appears that the same compiler (BCB6) has problems if the '::' is left in. For example...
template <class T> struct Foo { typedef typename ::boost::remove_reference< T >::type type; typedef typename ::boost::add_reference< typename ::boost::add_const< type >::type >::type ref_to_const_type; };
fails to compile.
This example doesn't contain any integral constant expressions, though.