|
Boost Users : |
From: Geoffrey Romer (geoff.romer_at_[hidden])
Date: 2005-10-09 15:53:58
On 10/7/05, Geoffrey Romer <geoff.romer_at_[hidden]> wrote:
> I'm having trouble with insert<> as called on a set. Specifically, it
> doesn't seem to be possible to iterate over sets built with insert<>.
> The following code, for example, works correctly (or at least,
> compiles without errors):
>
> ---
> typedef set<double, char> m_set;
> typedef transform<m_set, lambda<identity<_1> > >::type result;
> ---
>
> but the following (which as I understand it should be equivalent)
> fails to compile:
>
> ---
> typedef insert<insert<set<>, double>::type, char>::type m_set;
> typedef transform<m_set, lambda<identity<_1> > >::type result;
> ---
On the assumption that this is a bug, or at least a non-obvious usage
error, can anyone suggest a workaround? At present I can find no way
to insert an item into a set in a way that produces a usable set, and
this is a major obstacle in the project I'm working on.
Also, is boost or boost-users the preferred forum for these sorts of
questions? boost-users seems more appropriate (since this may, after
all, be an error on my part), but I've found boost to be much more
responsive.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net