Boost logo

Boost Testing :

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


On Fri, 28 May 2010, Steven Watanabe wrote:

> AMDG
>
> Jeremiah Willcock wrote:
>> 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.
>
> It does not compile. Here's the output:

What about this one:

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

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

template <typename A>
struct distributedS {};

template <typename Vertex>
struct compressed_sparse_row_graph {};

template <typename A, typename T, typename Bundle>
struct property_map<
          compressed_sparse_row_graph<
            distributedS<A> >,
          T Bundle::*>
{
   typedef double type;
};

struct vertex_prop {
   float member;
};

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

-- Jeremiah Willcock


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