|
Boost Users : |
Subject: [Boost-users] [Concept.Check] BOOST_CONCEPT_ASSERT and OutputIterator
From: Jens Müller (blog_at_[hidden])
Date: 2014-05-15 14:21:51
Hi,
what might be wrong about this concept check?
BOOST_CONCEPT_ASSERT( ( OutputIterator< std::back_insert_iterator<
std::vector< bool > >, bool > ) );
It causes this compiler error:
> In file included from /home/jens/hacon/build/boost-1.46.1/boost/concept/assert.hpp:36:0,
> from /home/jens/hacon/build/boost-1.46.1/boost/concept_check.hpp:20,
> from /home/jens/hacon/build/boost-1.46.1/boost/bimap/detail/bimap_core.hpp:31,
> from /home/jens/hacon/build/boost-1.46.1/boost/bimap/bimap.hpp:61,
> from /home/jens/hacon/build/boost-1.46.1/boost/bimap.hpp:13,
> from src/XYZ.cpp:8:
> src/xyz.cpp: In function â{anonymous}::triboolInheritFromAnyNeighborConverter_c<BoolOutputIterator> {anonymous}::makeTriboolInheritFromAnyNeighborConverter(BoolOutputIterator)â:
> src/xyz.cpp:546:5: error: â*â cannot appear in a constant-expression
> BOOST_CONCEPT_ASSERT( ( OutputIterator< std::back_insert_iterator< std::vector< bool > >, bool > ) );
> ^
> src/XYZ.cpp:546:5: error: a call to a constructor cannot appear in a constant-expression
> BOOST_CONCEPT_ASSERT( ( OutputIterator< std::back_insert_iterator< std::vector< bool > >, bool > ) );
> ^
> src/XYZ.cpp:546:5: error: template argument 1 is invalid
> BOOST_CONCEPT_ASSERT( ( OutputIterator< std::back_insert_iterator< std::vector< bool > >, bool > ) );
> ^
> src/XYZ.cpp:546:5: error: template argument 1 is invalid
> BOOST_CONCEPT_ASSERT( ( OutputIterator< std::back_insert_iterator< std::vector< bool > >, bool > ) );
> ^
> src/XYZ.cpp:546:105: error: invalid type in declaration before â;â token
> BOOST_CONCEPT_ASSERT( ( OutputIterator< std::back_insert_iterator< std::vector< bool > >, bool > ) );
Thanks, Jens
P.S.: I of course have:
#include <vector>
#include <boost/concept_check.hpp>
#include <boost/concept/assert.hpp>
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net