Boost logo

Boost :

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


Andrew Sutton wrote:

> That seems overly complicated. Why not...
>
> template <typename...> failed call(...);
> template <typename F, typename... Args>
> auto call(F&& f, Args... args) -> decltype(f(args...));

Because that's C++0x, while my code is C++03.

> I'm waving my hands a bit since F() and Args() require everything to be
> default constructible, but you can get around that with some clever
> metaprogramming machinery and fake accessor functions.

Which is why I use make<T>() instead of T().

> Caveat: you probably need an SVN build of GCC to actually make that work
> without internal compiler errors :)

I've had no problem at all with a standard GCC 4.4 build.
What kind of ICEs are they? If it's mangling issues, they're not very
hard to circumvent usually.


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