Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-05-11 12:20:01


"Russell Hind" <rh_gmane_at_[hidden]> wrote in message
news:d5tbph$onv$1_at_sea.gmane.org...
> Gennadiy Rozental wrote:
>>
>> This one is most difficult to fix. It caused by inability of Borland to
>> deal with "in class" using declaration. Until it's resolved no sense to
>> try fix anything else. Any help is appreciated.
>>
>
> What is 'has'? Rest defaults to 'nil' which doesn't have a member 'has'
> anyway.

struct nil{};

template<T, Rest=nil>
class A : public Rest {
public:
      void foo( T );
      using Rest::foo;
};

Let say we have instantiation A<int,A<float,A<char> > >. Without using, void
foo( int ) will hide all other overloads. I could add foo to nil. But I do
not think it's an issue here.

Gennadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk