From: Beman Dawes (bdawes_at_[hidden])
Date: 2006-11-13 17:24:14
Matthias Troyer wrote:
> Due to recent changes to the filesystem library now, the header
> detail/identifier.hpp is now included in my projects and contains the
> dangerous code segment:
> template <class Ostream, class Id>
> typename enable_if< is_base_of< identifier< typename
> Id::value_type, Id >, Id >,
> Ostream & >::type operator<<( Ostream & os, const Id & id )
> return os << id.value();
> which breaks all of my codes, since I have a type Id, that has a type
> member Id::value_type which is an abstract base class. My compiler
> (Apple gcc-4.0) now tries to instantiate identifier< typename
> Id::value_type, Id >, which fails because Id::value_type is abstract,
> and the compiler aborts with an error message.
> This causes all of our codes to fail to compile with the current CVS
There are several things going on here,
* boost/system/error_code.hpp is now included by the filesystem library,
and also presumably asio. boost/system/error_code.hpp in turn uses
boost::detail::identifier from boost/detail/identifier.hpp.
* When I moved identifier.hpp into boost/detail, I forgot to also move
class identifier from namespace boost to namespace boost::detail. That
has now been corrected in CVS.
* There is a SFINAE issue, as you point out in another post. It works
with some compilers but not others. I don't have time at the moment to
sort it out, so simply commented out the insert and extractor for now.
Thanks for the bug report!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk