Boost logo

Boost :

Subject: Re: [boost] [C++0x] Report from Frankfurt committee meeting
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2009-08-12 19:16:15


Scott McMurray wrote:
> And when they do build
> infrastruture, there are holes. (Try to write the downcast you need
> in "void Foo<T>(T x) where T : IFoo;" so that you can pass x to "void
> Bar<U>(U x) where T : IFoo, IBar;", for example.)

Disallowing downcasting, which is inherently unsafe, sounds more like a
design decision than a hole in the system.
Use overloading instead to visit the possible values. (just a wild
guess, I know nothing of C# generics)


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