Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-01-05 15:36:09

"Jonathan Turkanis" <technews_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote in message
>> "Jonathan Turkanis" <technews_at_[hidden]> writes:
>> >> Fixed now in CVS.
>> >>
>> >
>> > Cool! Now I can get rid of my crzy workarounds. Thanks.
>> Did I mention that it was a terrible EDG bug?
> Yeah, you said that's what it probably was. Now that you know what was going
> wrong, can you think of a simple example (i.e., not using any library code)
> which illustrates the problem?

template <class T> struct type_wrapper {};

template<typename T>
    type_wrapper<T>const volatile*
  , type_wrapper<typename T::tag>* =0

template<typename T>
struct has_tag
    typedef type_wrapper<T> t_;
    static const bool value=sizeof(


template <class T> struct xx;
template <class T> struct yy { typedef T::type type; };
    a = has_tag<xx<yy<int> > >::value

Notice that preceding the use of has_tag_helper with :: seems to
suppress the bug.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at