is_convertible_basic_impl and OpenMP - compile error

Hi, I'd like to report nasty behaviour of boost when used inside OpenMP loops. In the following example compile error is generated under Visual 2008, if "default(none)" is used for OpenMP variable data sharing attribute clauses (which is the recommended choice). #define BOOST_ALL_NO_LIB 1 #include <boost/graph/adjacency_list.hpp> #include <omp.h> int main(int argc, char* argv[]) { typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::undirectedS> GraphType; typedef GraphType::adjacency_iterator GraphAdjacencyIterator; const unsigned int vertex_count( 20 ); typedef std::pair<int, int> EdgeType; std::vector<EdgeType> edges; const GraphType graph( edges.begin(), edges.end(), vertex_count, edges.size() ); int i( 0 ); #pragma omp parallel for schedule(static, 1) default(none) private(i) shared(vertex_count, graph) for ( i = 0; i < vertex_count; ++i ) { const std::pair<GraphAdjacencyIterator, GraphAdjacencyIterator> adjacent ( boost::adjacent_vertices(i, graph) ); } return 0; } "\boost\boost/type_traits/is_convertible.hpp(263) : error C3052: '_m_from' : variable doesn't appear in a data-sharing clause under a default(none) clause"

Can someone knowledgeable confirm whether this qualifies as a bug in boost (type traits library I guess?)? And whether this is going to be fixed? Casual users of boost like me feel completely lost when they see this error, especially somewhere 20 template levels deep.

At Mon, 18 Oct 2010 15:04:06 +0200, Remi wrote:
Can someone knowledgeable confirm whether this qualifies as a bug in boost (type traits library I guess?)?
I don't think you can call it a bug unless the authors of the library had a specific intention to support OpenMP extensions. But they might be willing to address it as a QOI issue.
And whether this is going to be fixed?
Probably not unless someone opens a Trac ticket at http://svn.boost.org :-)
Casual users of boost like me feel completely lost when they see this error, especially somewhere 20 template levels deep.
Understandable -- Dave Abrahams BoostPro Computing http://www.boostpro.com
participants (2)
-
David Abrahams
-
Remi