Opened 12 years ago
Closed 12 years ago
#5375 closed Bugs (worksforme)
is_container itself should be MPL boolean instead of type typedef.
Reported by: | Owned by: | Hartmut Kaiser | |
---|---|---|---|
Milestone: | To Be Determined | Component: | spirit |
Version: | Boost 1.46.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Expression Semantics in http://www.boost.org/doc/libs/1_46_1/libs/spirit/doc/html/spirit/advanced/customize/is_container.html says that is_container<C>::type is MPL Boolean Constant.
However, at least, inside boost/spirit/home/qi/detail/pass_container.hpp and boost/spirit/home/karma/detail/pass_container.hpp, is_container<C> itself is used as MPL Boolean Constant, like traits::is_container<RHSAttribute>::value.
NOTE: Version field does not have 1.46.1, so I set it to 1.46.0.
Change History (4)
comment:1 by , 12 years ago
Owner: | changed from | to
---|
follow-up: 3 comment:2 by , 12 years ago
follow-up: 4 comment:3 by , 12 years ago
Replying to hkaiser:
Sorry I do not understand your problem.
boost::spirit::traits::is_container<>
is derived frommpl::bool_<>
(see $BOOST_ROOT/boost/spirit/home/support/contain.hpp). What's wrong with that?
Sorry for unclarity. Implementation has no problem. The problem point is documentation.
is_container is provided for customization point. A reader who wants to provide is_container can misunderstand providing type' is enough, according to the current documentation because "Expression Semantics" only mentions
type'.
comment:4 by , 12 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Replying to anonymous:
Replying to hkaiser:
Sorry I do not understand your problem.
boost::spirit::traits::is_container<>
is derived frommpl::bool_<>
(see $BOOST_ROOT/boost/spirit/home/support/contain.hpp). What's wrong with that?Sorry for unclarity. Implementation has no problem. The problem point is documentation. is_container is provided for customization point. A reader who wants to provide is_container can misunderstand providing
type' is enough, according to the current documentation because "Expression Semantics" only mentions
type'.
The documentation clearly states that is_container<C>::type
has to evaluate to an MPL boolean constant (see expression semantics here: http://www.boost.org/doc/libs/1_46_1/libs/spirit/doc/html/spirit/advanced/customize/is_container.html#spirit.advanced.customize.is_container.expression_semantics).
Sorry I do not understand your problem.
boost::spirit::traits::is_container<>
is derived frommpl::bool_<>
(see $BOOST_ROOT/boost/spirit/home/support/contain.hpp). What's wrong with that?