Boost logo

Boost :

Subject: Re: [boost] [context] ready
From: TONGARI (tongari95_at_[hidden])
Date: 2011-11-09 16:01:01


2011/11/9 Oliver Kowalke <oliver.kowalke_at_[hidden]>

>
> > My solution is: remove icontext, use non-templated context_base directly.
> > So it looks like:
>
> <snip>
>
> OK - I got it and I'll take it into account. thx!
>

In the sample code I gave I forgot one important thing -- init order.
Please apply trick like this:

template< typename Fn, typename Allocator >
class context_object : compressed_pair<Fn, Allocator>, public context_base
{...};

By first private inheriting, the order is guaranteed and it's safe to
pass allocator
to context_base(...).


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