
On 07/22/10 04:20, Steve Lorimer wrote:
Thanks for your input Peter and Larry.
Larry, I'm fearful of using unreleased code. Any idea when your package_range_c could become part of an official boost release?
No idea. I've not gotten much feedback, maybe because there's no documentation??? However, most of the existing mpl docs would apply to the variadic mpl. Also, I'm having trouble getting the code to work with spirit. At present, I'm working on converting mpl:;and_ and mpl::or_ and variant to variadic versions in order to get the code to work with spirit. It's been very tough :(
With that in mind I'm interested in using Peter's approach (which I'm sure is very similar to the internals of your package_c hey Larry?)
Do you mean package_range_c? If so, then yes, it is essentially the same. The only reason for the extra features (arbitrary Value and Start and Finish template params) is that it seemed easy enough to implement.
I have 3 questions please.
[snip]
3. In attached file "attempt_2.cpp" at Line 27, there's a struct cb_ with a typedef "type" of the member function pointer of the form T::fn(Args...).
template< class T, class... Args > struct cb_ { typedef void (T::*type)(Args...); };
As far as I can see, this is of the same form as Peter's void (T::*pm)(Args...) member function pointer is it not? How come the compiler can't match &X::f with typename cb_
::type?
My gcc4.5 gives error:
attempt_2.cpp: In member function 'void func