Issue with X3 and MS VS2017

三世轮回 提交于 2021-01-29 10:30:46

问题


I am having a weird problem with boost spirit X3 (v1.69) in combination with MS VS2017.

I am getting compiling errors in well formed structures. When I use the same code block in gcc and clang through Coliru or Wandbox, the source compiles and everything goes right.

But when I use that same code in VS 2017, compiling errors appears until I comment an 'omit' sentence.

Please, any help with this?

#include <vector>
#include <iostream>
#include <boost/spirit/home/x3.hpp>
#include <boost/fusion/adapted/struct.hpp>
#include <boost/fusion/include/vector.hpp>

namespace x3 = boost::spirit::x3;

namespace definitions
{
    enum DIRECTION { NOMINAL, REVERSE };
    enum SIDE { LEFT, RIGHT };
}

namespace structs
{
    struct Door
    {
        std::string label;
        int start_id;
        double start_location;
        definitions::DIRECTION dir;
        std::vector<int> list;
        int end_id;
        double end_location;
        definitions::SIDE side;
    };
}

BOOST_FUSION_ADAPT_STRUCT(structs::Door, label, start_id, start_location, dir, list, end_id, end_location, side)

namespace parsers
{
    using x3::int_;
    using x3::char_;
    using x3::double_;
    using x3::eol;
    using x3::omit;
    using x3::seek;
    using x3::skip;
    using x3::blank;
    using x3::lexeme;
    using x3::ascii::space;
    using x3::eps;
    using x3::attr;

    auto const quoted = '"' >> lexeme[*~char_('"')] >> '"';
    auto const comment = -("--" >> omit[*~char_("\r\n")]) >> eol;
    auto const skippers = blank | '(' | ',' | ')';

    struct direction_ : x3::symbols<definitions::DIRECTION>
    {
        direction_() { add("NOMINAL", definitions::NOMINAL)
                          ("REVERSE", definitions::REVERSE); }
    } direction;

    struct side_ : x3::symbols<definitions::SIDE>
    {
        side_() { add("LEFT", definitions::LEFT)
                     ("RIGHT", definitions::RIGHT); }
    } side;

    namespace item
    {
        int n_items = 0;
        int n_read_items = 0;

        auto fn_n_items = [](const auto& ctx) { n_items = _attr(ctx); n_read_items = 0; };
        auto fn_more_items = [](const auto& ctx) { _pass(ctx) = (n_read_items != n_items); };
        auto fn_n_item_read = [](const auto& ctx) { ++n_read_items; };
    }

    namespace door
    {
        auto const text = eol >> "[AREA]"
            >> *comment >> quoted
            >> *comment >> int_ >> *comment >> double_ >> *comment >> direction
            >> *comment >> omit[int_[item::fn_n_items]]//I must comment this needed line in order to get VS compiling.
            >> *(eps[item::fn_more_items] >> *comment >> int_[item::fn_n_item_read])
            >> !eps[item::fn_more_items]
            >> *comment >> int_ >> *comment >> double_
            >> *comment >> side;

        auto const start = skip(skippers)[*seek[text]];
    }
}

std::string text = "\n\
[AREA]\n\
\n\
\"LABEL-1\" --Comment\n\
--Start\n\
-- Id   Location(m) Dir\n\
-- --------------------------------\n\
374     84.8      AGAINST_SEGMENT -- Comment\n\
\n\
-- List\n\
-- ---------------------------------------------- -\n\
0   --There are none\n\
\n\
-- End\n\
-- Id   Location(m)\n\
-- -------------------- -\n\
374      6.7   --Comment\n\
\n\
--------------------------------------------------------------------------------\n\
RIGHT -- Doors\n";

int main()
{
    std::vector<structs::Door> doors;
    const bool result = x3::parse(text.begin(), text.end(), parsers::door::start, doors);
    std::cout << std::boolalpha << result << "\n";
    std::cout << doors.size() << "\n";;


    for (const auto& door : doors)
        std::cout << door.platform_label << "\n";

    return 0;
}

EDIT: The output from VS states the next lines (some cut due to char in questions > 30000):

z:\externos\boost_1_69_0\boost\mpl\aux_\push_back_impl.hpp(40): error C2664: 'int boost::mpl::assertion_failed<false>(boost::mpl::assert<false>::type)': el argumento 1 no puede convertirse de 'boost::mpl::failed ************(__cdecl boost::mpl::push_back_impl<boost::mpl::aux::vector_tag<20>>::apply<Sequence,T>::REQUESTED_PUSH_BACK_SPECIALIZATION_FOR_SEQUENCE_DOES_NOT_EXIST::* ***********)(Sequence)' a 'boost::mpl::assert<false>::type'
        with
        [
            Sequence=boost::mpl::vector20<boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,int,boost::spirit::x3::unused_type,double,boost::spirit::x3::unused_type,definitions::DIRECTION,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,std::vector<int,std::allocator<int>>,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,int,boost::spirit::x3::unused_type,double>,
            T=boost::spirit::x3::unused_type
        ]
z:\externos\boost_1_69_0\boost\mpl\aux_\push_back_impl.hpp(44): note: Ningún constructor ha podido aceptar el tipo de origen o bien la resolución de sobrecarga del constructor era ambigua
z:\externos\boost_1_69_0\boost\mpl\push_back.hpp(32): note: vea la referencia a la creación de instancias de plantilla clase de 'boost::mpl::push_back_impl<boost::mpl::aux::vector_tag<20>>::apply<Sequence,T>' que se está compilando
        with
        [
            Sequence=boost::mpl::vector20<boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,int,boost::spirit::x3::unused_type,double,boost::spirit::x3::unused_type,definitions::DIRECTION,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,std::vector<int,std::allocator<int>>,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,int,boost::spirit::x3::unused_type,double>,
            T=boost::spirit::x3::unused_type
        ]
z:\externos\boost_1_69_0\boost\spirit\home\x3\operator\detail\sequence.hpp(257): note: vea la referencia a la creación de instancias de plantilla clase de 'boost::mpl::push_back<boost::mpl::vector20<boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,std::basic_string<char,std::char_traits<char>,std::allocator<char>>,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,int,boost::spirit::x3::unused_type,double,boost::spirit::x3::unused_type,definitions::DIRECTION,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,std::vector<int,std::allocator<int>>,boost::spirit::x3::unused_type,boost::spirit::x3::unused_type,int,boost::spirit::x3::unused_type,T>,boost::spirit::x3::unused_type>' que se está compilando
        with
        [
            T=double
        ]
z:\externos\boost_1_69_0\boost\spirit\home\x3\operator\detail\sequence.hpp(256): note: vea la referencia a la creación de instancias de plantilla clase de 'boost::spirit::x3::detail::get_sequence_types<LL,LR,C>' que se está compilando
        with
        [
            LL=boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::eol_parser,boost::spirit::x3::extension::as_parser<char [30],void>::type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char,void>::type,boost::spirit::x3::lexeme_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::literal_char<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>,boost::spirit::x3::extension::as_parser<char,void>::type>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::int_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::double_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,parsers::direction_>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::omit_directive<boost::spirit::x3::action<boost::spirit::x3::int_parser<int,10,1,-,parsers::item::<lambda_d1b1cbe3e7289d51c628572e438fda4a>>>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::action<boost::spirit::x3::eps_parser,parsers::item::<lambda_0b1c0b65cb2f19afa028148314b8a6b0>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::action<boost::spirit::x3::int_parser<int,10,1,-,parsers::item::<lambda_a13da2021da3a6562e443db4fbb0e6cd>>>>>,boost::spirit::x3::not_predicate<boost::spirit::x3::action<boost::spirit::x3::eps_parser,parsers::item::<lambda_0b1c0b65cb2f19afa028148314b8a6b0>>>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::int_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::double_type>,
            LR=boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>,
            C=boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const boost::spirit::x3::alternative<boost::spirit::x3::alternative<boost::spirit::x3::alternative<boost::spirit::x3::standard::blank_type,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::unused_type>
        ]

z:\externos\boost_1_69_0\boost\spirit\home\x3\operator\detail\sequence.hpp(257): error C3203: 'type': clase plantilla sin especializar no se puede utilizar como argumento de plantilla para el parámetro de plantilla 'Sequence'; se esperaba un tipo real
z:\externos\boost_1_69_0\boost\mpl\push_back.hpp(31): error C2903: 'apply': el símbolo no es plantilla de clase ni plantilla de función
z:\externos\boost_1_69_0\boost\spirit\home\x3\operator\detail\sequence.hpp(257): note: vea la referencia a la creación de instancias de plantilla clase de 'boost::mpl::push_back<int,definitions::DOOR>' que se está compilando
z:\externos\boost_1_69_0\boost\mpl\push_back.hpp(32): error C3770: 'unknown-type': no es una clase base válida
z:\externos\boost_1_69_0\boost\spirit\home\x3\operator\detail\sequence.hpp(278): error C2039: 'type': no es un miembro de 'boost::spirit::x3::detail::get_sequence_types<L,R,C>'
        with
        [
            L=boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::eol_parser,boost::spirit::x3::extension::as_parser<char [30],void>::type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char,void>::type,boost::spirit::x3::lexeme_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::literal_char<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>,boost::spirit::x3::extension::as_parser<char,void>::type>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::int_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::double_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,parsers::direction_>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::omit_directive<boost::spirit::x3::action<boost::spirit::x3::int_parser<int,10,1,-,parsers::item::<lambda_d1b1cbe3e7289d51c628572e438fda4a>>>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::action<boost::spirit::x3::eps_parser,parsers::item::<lambda_0b1c0b65cb2f19afa028148314b8a6b0>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::action<boost::spirit::x3::int_parser<int,10,1,-,parsers::item::<lambda_a13da2021da3a6562e443db4fbb0e6cd>>>>>,boost::spirit::x3::not_predicate<boost::spirit::x3::action<boost::spirit::x3::eps_parser,parsers::item::<lambda_0b1c0b65cb2f19afa028148314b8a6b0>>>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::int_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::double_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,
            R=parsers::door_side_,
            C=boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const boost::spirit::x3::alternative<boost::spirit::x3::alternative<boost::spirit::x3::alternative<boost::spirit::x3::standard::blank_type,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::unused_type>
        ]
z:\externos\boost_1_69_0\boost\spirit\home\x3\operator\detail\sequence.hpp(278): note: vea la declaración de 'boost::spirit::x3::detail::get_sequence_types<L,R,C>'
        with
        [
            L=boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::eol_parser,boost::spirit::x3::extension::as_parser<char [30],void>::type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char,void>::type,boost::spirit::x3::lexeme_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::literal_char<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>,boost::spirit::x3::extension::as_parser<char,void>::type>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::int_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::double_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,parsers::direction_>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::omit_directive<boost::spirit::x3::action<boost::spirit::x3::int_parser<int,10,1,-,parsers::item::<lambda_d1b1cbe3e7289d51c628572e438fda4a>>>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::sequence<boost::spirit::x3::action<boost::spirit::x3::eps_parser,parsers::item::<lambda_0b1c0b65cb2f19afa028148314b8a6b0>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::action<boost::spirit::x3::int_parser<int,10,1,-,parsers::item::<lambda_a13da2021da3a6562e443db4fbb0e6cd>>>>>,boost::spirit::x3::not_predicate<boost::spirit::x3::action<boost::spirit::x3::eps_parser,parsers::item::<lambda_0b1c0b65cb2f19afa028148314b8a6b0>>>>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::int_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,boost::spirit::x3::double_type>,boost::spirit::x3::kleene<boost::spirit::x3::sequence<boost::spirit::x3::optional<boost::spirit::x3::sequence<boost::spirit::x3::extension::as_parser<char [3],void>::type,boost::spirit::x3::omit_directive<boost::spirit::x3::kleene<boost::spirit::x3::negated_char_parser<boost::spirit::x3::char_set<boost::spirit::char_encoding::standard,boost::spirit::char_encoding::standard::char_type>>>>>>,boost::spirit::x3::eol_parser>>>,
            R=parsers::door_side_,
            C=boost::spirit::x3::context<boost::spirit::x3::skipper_tag,const boost::spirit::x3::alternative<boost::spirit::x3::alternative<boost::spirit::x3::alternative<boost::spirit::x3::standard::blank_type,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::extension::as_parser<char,void>::type>,boost::spirit::x3::unused_type>
        ]
z:\externos\boost_1_69_0\boost\spirit\home\x3\operator\detail\sequence.hpp(278): error C2955: 'boost::type': el uso de clase plantilla requiere una lista de argumentos de plantilla
z:\externos\boost_1_69_0\boost\type.hpp(14): note: vea la declaración de 'boost::type'
z:\externos\boost_1_69_0\boost\spirit\home\x3\operator\detail\sequence.hpp(286): error C3203: 'type': clase plantilla sin especializar no se puede utilizar como argumento de plantilla para el parámetro de plantilla 'P1'; se esperaba un tipo real

I provide links to both Coliru / Wandbox to show what I am talking about:

https://coliru.stacked-crooked.com/a/3f9293c8ef0da3c0

https://wandbox.org/permlink/hoT6NRNg5JMq32B9

I would be glad if anyone tries to propose an alternative paarsing rule that I could test in VS 2017.

Thank you in advance.

来源:https://stackoverflow.com/questions/55900932/issue-with-x3-and-ms-vs2017

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!