From: Matthias Troyer (troyer_at_[hidden])
Date: 2006-11-13 15:09:56
On Nov 13, 2006, at 4:08 PM, David Abrahams wrote:
> Matthias Troyer <troyer_at_[hidden]> writes:
>> On Nov 12, 2006, at 6:46 PM, David Abrahams wrote:
>>> Matthias Troyer <troyer_at_[hidden]> writes:
>>>> 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
>>>> 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
>>>> and the compiler aborts with an error message.
>>> Is that a compiler bug?
> Maybe you're actually saying that you don't have a type called Id; you
> just have
Yes, sorry if I was unclear.
> Fair enough. I think the correct thing to do is put the definition of
> class template identifier in its own subnamespace of boost along with
> the streaming operator (no need for enable_if). It could then be
> imported into namespace boost with a using declaration...
> Frankly, I'm not sure that reserving the name boost::identifier is the
> right thing to do, especially if it's in a detail header. Is this a
> public interface, or not? If not, it shouldn't be directly in
> boost::. If so, it should be documented somewhere and it should have
> passed through a review. Did it?
It was checked in on November 3rd by Beman Dawes, and I recently
realized that now my codes are broken becuase of it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk