[Boost-bugs] [Boost C++ Libraries] #4750: is_convertible_basic_impl causes compile error when used inside OpenMP loop

Subject: [Boost-bugs] [Boost C++ Libraries] #4750: is_convertible_basic_impl causes compile error when used inside OpenMP loop
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-10-18 15:09:03


#4750: is_convertible_basic_impl causes compile error when used inside OpenMP loop
----------------------------------------+-----------------------------------
 Reporter: therealremi@… | Owner: johnmaddock
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: type_traits
  Version: Boost 1.44.0 | Severity: Problem
 Keywords: OpenMP, type traits, graph |
----------------------------------------+-----------------------------------
 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). It's practically a deal breaker when a
 novice user tries to use boost with OpenMP. And I would say OpenMP use
 will only grow.


 #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"

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/4750>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:04 UTC