
John, I'll look into this later tonight. Regards Hartmut
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of John Maddock Sent: Saturday, October 27, 2007 11:58 AM To: Boost mailing list Subject: [boost] [Spirit] Using real_parser with user-defined numeric types
I'm having a problem using real_parser, I define the parser as:
real_parser<some-type> const rr_p;
Then use it as:
str_p("range")[assign_a(started, false)] && rr_p[assign_a(a)] && rr_p[assign_a(b)]
Followed by a list of other alternative commands.
When some-type is float/double/long double it all works OK, but as soon as I change some-type to boost::math::ntl::RR then I have two problems:
1) The code doesn't compile: spirit looks for std::pow rather than relying on ADL to find the right overload, I can work around this one for now by importing boost::math::ntl::pow into namespace std. 2) The parser doesn't work, any simple command like "range 0 1" is rejected as invalid.
Is there something else I need to do here to enable support for UDT's?
Thanks, John.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost