[range] multiple adaptors on sequense
Hello,
Is it possible to apply multiple adaptors to a range-base sequence?
Is looks like possible for simple types:
#include <string>
#include <vector>
#include
On Wed, Nov 3, 2010 at 1:11 PM, Sam Fisher
Hello,
Is it possible to apply multiple adaptors to a range-base sequence? Is looks like possible for simple types:
It is possible and indeed commonly done. It is a core design goal and advantage of ranges that lengthy composition works, and is readable. There is no fundamental undocumented constraint of which I am aware than those I have documented. <snip code sample> Your example works perfectly if you replace the pheonix bind operations with functors. Hence this appears to be a compatibility issue between the transform iterator and pheonix bind. I will investigate further and report back, but I wanted to let respond with what I know now in case this helps.
What I'm doing wrong? I use MSVS 2010 and boost trunk.
It is likely that you are doing nothing wrong. I would like all of the Boost libraries to integrate perfectly with Boost.Range and your use-case looks perfectly sensible.
Thanks, Sam _______________________________________________
Regards, Neil Groves
On Wed, Nov 3, 2010 at 1:11 PM, Sam Fisher
Hello,
Is it possible to apply multiple adaptors to a range-base sequence? Is looks like possible for simple types:
What I'm doing wrong? I use MSVS 2010 and boost trunk.
I believe that the defect is related to Subversion commit 57503 that was intended to remove a warning, but it has the side-effect of making the Phoenix actors always non-assignable regardless of the template parameters. During my testing with GCC/Linux I was able to get your code to compile by commenting out line 143 of boost/spirit/home/phoenix/core/actor.hpp Would you assist me by making the same change and posting your results? If this fixes your problem I shall raise a Trac issue and submit a patch for Phoenix.
Thanks, Sam
Regards, Neil Groves
Hello, On 03.11.2010 19:41, Neil Groves wrote:
I believe that the defect is related to Subversion commit 57503 that was intended to remove a warning, but it has the side-effect of making the Phoenix actors always non-assignable regardless of the template parameters.
During my testing with GCC/Linux I was able to get your code to compile by commenting out line 143 of boost/spirit/home/phoenix/core/actor.hpp
Would you assist me by making the same change and posting your results? If this fixes your problem I shall raise a Trac issue and submit a patch for Phoenix.
I have repeated the test with commented line 143 in actor.hpp In the same environment it works perfectly and do the exactly as supposed to. Thank you for helping. Thanks, Sam
participants (2)
-
Neil Groves
-
Sam Fisher