taocpp / PEGTL

Parsing Expression Grammar Template Library
Boost Software License 1.0
1.94k stars 228 forks source link

'template argument 3 is invalid' #58

Closed Ironholds closed 7 years ago

Ironholds commented 7 years ago

Using a modified version of the 'ID and sum comma-separated digits' example:

peg_test.cpp:29:68: error: template argument 3 is invalid
                            seq< plus< D >, opt< dot, star< D > > > > {};
                                                                    ^
In file included from ../inst/include/pegtl/internal/action.hpp:9:0,
                 from ../inst/include/pegtl/internal/rules.hpp:7,
                 from ../inst/include/pegtl/ascii.hpp:11,
                 from ../inst/include/pegtl.hpp:10,
                 from peg_test.cpp:3:

C++11 via GCC 4.9.3; works fine on clang, however!

ColinH commented 7 years ago

Just looked at it briefly and can't see anything wrong; GCC 4.9 is one of the compilers that we test every commit with, see the Travis-CI config. Does the error also occur when you remove the Rcpp header file, and the code beneath the two namespaces?

Ironholds commented 7 years ago

Goood question. I'll find out!

Ironholds commented 7 years ago

Yep; looks like some conflict somewhere. Now resolved - thank you!

ColinH commented 7 years ago

Glad to hear - happy hacking :-)