
I'm trying to find a solution to the following problem. If I have an
associative sequence such as a fusion::set
and I make a filter view of it, the view is not a model of an associative
sequence and does not support the
has_key and at_key functions. I can use fusion::as_set on the view to get
an associative sequence again, but
this doesn't really have the effect I want as it results in a set holding
copies of the original data whereas the
view referenced the original data. Example below.
Would it be possible to create a view which supported the associative
sequence interface? Any suggested alternative approaches?
Thanks
Nate
~~~~~~~~~~~~~~~~~
#include
::type filtered_set(filtered_view); fusion::at_key<int>(filtered_set) = 16; // modifies the copied data in filtered_set. }