Re: [boost] MPL: set<> not fully supporting compile time iteration?

-----Original Message-----
Brian Braatz <brianb <at> rmtg.com> writes:
CLOSER (see below)
On Behalf Of Ryan [snip] Try:
typedef mpl::copy < mpl::begin<myset> , mpl::back_inserter<vec>
::type result_vec;
HTH
-Ryan
[Brian Braatz Writes:] THANK YOU RYAN- I am compiling now (one step closer) But I am still not getting the expected (??) behavior here is the current code ...
[Ryan Writes:]
Sorry about the leading you down the wrong path Brian. I was really thinking about:
typedef mpl::copy < mpl::iterator_range<mpl::begin<myset>::type, mpl::end<myset>::type > , mpl::back_inserter< vec > >::type result_vec;
which would only be a work around but IMO is more similar to the runtime equivalent. I am a little suprised the mpl::begin<> compiled, but I need to review Dave's and Alesky's MPL book again and will hopefully come to understand.
I was actually on the newsgroup yesterday to see the answer to your great remove_duplicate_types question. I had just written the equivalent runtime function using std::vector, std::sort, and std::unique and was wondering about how to handle std::sort in the compile_time world. I stopped on this thread because I saw that it could likely lead to the answer.
Thanks for the great question; I'll try to test a little better before answering any in the future. Cheers, [Brian Braatz Writes:] Hey, when one is sitting there staring at code going "why doesn't this work?!?!?!?!?!"", ANY Thoughts are appreciated. (the more thoughts that are thrown out there the better:)
:) Brian
participants (1)
-
Brian Braatz