
Christopher Schmidt wrote:
James Knight schrieb:
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
There is already a feature request for associative views (ticket 3473). I will get down to it once I am granted write access to the trunk. For now you could use my c++0x port of fusion. It correctly preserves the category of the underlying sequence's for all views. The port is fully backwards compatible, in terms of both features and compiler (non-0x compiler are supported). You can find the code in the sandbox (/sandbox/SOC/2009/fusion/).
And in case you are wondering, Christopher Schmidt's wonderful c++0x port will be the future of fusion. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net http://www.facebook.com/djowel Meet me at BoostCon http://www.boostcon.com/home http://www.facebook.com/boostcon