test/list.cpp list optional attributes not consistent with docs

Larry Evans <[email protected]>
Newsgroups gmane.comp.parsers.spirit.general
Message-ID <[email protected]>
These lines:

https://github.com/boostorg/spirit/blob/develop/test/x3/list.cpp#L81

    to:

https://github.com/boostorg/spirit/blob/develop/test/x3/list.cpp#L87

show the *same* grammar list expression:

    ('#' >> -alpha) % ','

can produce *different* attributes:

https://github.com/boostorg/spirit/blob/develop/test/x3/list.cpp#L81

which is a std::vector<optional<char>>

and:

https://github.com/boostorg/spirit/blob/develop/test/x3/list.cpp#L86

which is a std::vector<char>.

At least to me, that seems counter-intuitive.

Also, the attribute docs:

http://www.boost.org/doc/libs/1_65_0/libs/spirit/doc/html/spirit/qi/reference/operator/list.html

indicate the attribute should be:

    std::vector<optional<char> >

So why does the test in list.cpp with attribute std::vector<char> pass?

-regards,
Larry


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
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.