Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph][spirit][variant] Boost.Graph and Boost.Spirit incompatible ?
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2010-03-08 13:58:05


On Mon, 8 Mar 2010, Steven Watanabe wrote:

> 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);
> }

Could you please also test the include_test.cpp that got this thread
started? If that passes I'll commit the change and see if the regression
tests break (since there might be compiler compatibility issues). Thank
you.

-- Jeremiah Willcock


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