Extracting parsed value from a local variable

Michele De Stefano <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <CAJ7vBf3khAjtjYOiEpbfeVy_x8V8n75VzuOpZs04AOM=eEQ-ZA@mail.gmail.com>
Dear all,

here is my issue. I am creating a rule that happens to parse (amongst
several things) a double value into the qi::_a local variable. Now, while
staying into the same semantic action, I need to use that parsed double
value into another C++ instruction that requires a double value as input.

Think to this instruction as a generic

ouput_type f(double x)

The issue is that when I call (within the semantic action)

f(qi::_a)

the compiler complains that it cannot convert qi::_a into a double.

Is there a way to extract the double value from qi::_a (or anyway from any
placeholder)?

Thanks in advance.

Best regards,
Michele

-- 
Michele De Stefano
Linked In <http://it.linkedin.com/in/micheledestefano>
mds-utils: a general purpose Open Source library
<http://sourceforge.net/projects/mds-utils/>
Personal Web Site <https://sites.google.com/site/micdestefano/>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

_______________________________________________
Spirit-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spirit-general
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.