Re: Spirit X3 employee.cpp compile error

Larry Evans <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
On 08/10/2016 11:12 PM, Vincent Virgilio wrote:
> Visual Studio 2015 Professional
> Boost 1.61, Windows binary install
> Spirit X3 example 'employee.cpp' (http://ciere.com/example/x3/employee.cpp)
>
> Unless I add a third template argument of 'true' to the declaration of
> the employee rule, compilation fails with the below message. It's
> tripping on an ambiguous overload.
>
> Vince
>
[snip]
Hi Vince.

FWIW, the code here:

https://github.com/boostorg/spirit/blob/develop/include/boost/spirit/home/x3/nonterminal/rule.hpp#L75

does require a 3ird bool template argument.

However, the documentation here:

http://ciere.com/cppnow15/x3_docs/spirit/quick_reference/non_terminals.html

does not.

Maybe the ciere.com employee.cpp is based on a different library,
one where rule only has 2 template arguments.  I've tried, without
success, to find where on ciere.com that library might be available :(
When I pointed my browser to:

http://ciere.com/cppnow15/

it showed the link:

   X3 Documentation

pointing to:

   http://ciere.com/cppnow15/x3_docs/

but it also showed:

--{--cut here--
Spirit X3 Source

GitHub: [email protected]:boostorg/spirit.git

Use the develop branch.
--}--cut here--

and following the GitHub link:

https://github.com/boostorg/spirit/

lead to, eventually:

https://github.com/boostorg/spirit/blob/develop/include/boost/spirit/home/x3/nonterminal/rule.hpp#L75

which is where rule has 3 template arguments :(

So, I gave up at that point trying to find the 2 template argument rule
code :(

-regards,
Larry




------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. http://sdm.link/zohodev2dev
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.