Boost logo

Boost Testing :

Subject: [Boost-testing] [VC++10] Could someone please see if this compiles?
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-05-28 13:40:40


I'm trying to figure out a small test case for something that's failing in
Boost.Graph and that seems like a compiler bug. Here is a snippet that I
would appreciate having tested. Thank you.

-- Jeremiah Willcock

// CODE BELOW THIS LINE

template <typename Graph, typename Property>
struct property_map {};

template <typename Graph, typename T, typename Bundle>
struct property_map<Graph, T Bundle::*> {
   typedef int type;
};

struct directedS {};
template <typename A, typename B, typename C>
struct distributedS {};

template <typename D,
           typename VertexProperty, typename EdgeProperty,
           typename GraphProperty, typename Vertex,
           typename EdgeIndex>
struct compressed_sparse_row_graph {};

template <typename VertexProperty, typename EdgeProperty,
           typename GraphProperty, typename ProcessGroup,
           typename InVertex, typename InDistribution,
           typename InEdgeIndex, typename T, typename Bundle>
struct property_map<
          compressed_sparse_row_graph<
            directedS, VertexProperty, EdgeProperty, GraphProperty,
            distributedS<ProcessGroup, InVertex, InDistribution>,
            InEdgeIndex
>, T Bundle::*>
{
   typedef double type;
};

struct vertex_prop {
   float member;
};

int main(int, char**) {
   property_map<
     compressed_sparse_row_graph<
       directedS, vertex_prop, int, int,
       distributedS<int, int, int>, int>,
     float vertex_prop::*>::type**
     x = (double**)0;
   return 0;
}

// CODE ABOVE THIS LINE


Boost-testing list run by mbergal at meta-comm.com