[C++-sig] make_tuple()?
David Abrahams
david.abrahams at rcn.com
Sat Jul 20 04:49:27 CEST 2002
From: "Ralf W. Grosse-Kunstleve" <rwgk at yahoo.com>
> Yet another (unopinionated) question: What is better (in your opinion)?
>
> static
> object
> getstate(back_reference<world const&> x)
> {
> world const& w = x.get();
> }
>
> or
>
> static
> object
> getstate(object const& x)
> {
> // use extractor<world const&>
> }
It depends how you want it to interact with overloading.
> Is back_reference<> obsolete?
No, object will match anything but back_reference<T> matches only arguments
convertible to T.
HTH,
Dave
More information about the Cplusplus-sig
mailing list