Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph][spirit][variant] Boost.Graph and Boost.Spirit incompatible ?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-03-08 12:53:32


AMDG

Jeremiah Willcock wrote:
>> I thought at first that it would, but unfortunately not.
>> Suppose that the argument is a built-in type...
>>
>> So, here's try #2 at making property_traits usable
>> for SFINAE (untested).
>
> I did some little fixes to this (patch to trunk version of
> property_map.hpp attached) and it again passes the graph,
> graph_parallel, and property_map test cases. Could you please try it
> again with the variant bug cases?

The following tests both compile after I updated two_bit_color_map.hpp to
use SFINAE on property_traits.

#include <boost/graph/two_bit_color_map.hpp>
#include <boost/variant.hpp>

int test1() {
    using namespace boost;
    boost::variant<int, char> v;
    int i = get<int>(v);
}

// make sure that it works even with incomplete types
struct S;

typedef boost::variant<boost::recursive_wrapper<S> > v_type;

void test2(v_type& v) {
    boost::get<S>(&v);
}

In Christ,
Steven Watanabe


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