$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-01-23 06:43:47
From: "David Abrahams" <dave_at_[hidden]>
>
> I've been talking with Aleksey recently about how to improve the
> syntactic situation without losing the separation of concerns that we
> get, but we didn't come up with anything convincingly better. I think
> a long time ago the for_each parameter used to look like:
>
> class f
> {
> template <class T>
> struct apply
> {
> static void execute() {...};
> };
> };
>
> IOW, a metafunction class with a nested 'execute' function. However
> that's not really any better syntactically, it has problems carrying
> state, and it's anti-idiomatic.
The state problem is easy:
struct F
{
template<class T> void execute();
};