From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-03-10 16:50:52
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
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk