|
Boost : |
Subject: Re: [boost] MSVC9 SFINAE quirks?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-01-08 15:56:12
AMDG
Simonson, Lucanus J wrote:
>> I can take a look at it if I have a full test case to work with.
>> Where can I get the current version of gtl?
>> https://svn.boost.org/svn/boost/sandbox/gtl is old.
>>
>
> Try it now. You can just add #include "gtl.hpp" at the top of the code snippet from my previous email and you should be able to reproduce the same compiler errors I'm seeing using what is now in the sandbox.
>
Okay. So msvc just doesn't like SFINAE except at the top level.
I think you're going to have to make all the tests boolean metafunctions
and add a top level enable_if. For example:
template <typename geometry_type_1, typename geometry_type_2>
typename boost::enable_if<
boost::mpl::and_<is_any_polygon_set_type<geometry_type_1>,
is_any_polygon_set_type<geometry_type_2>,
is_either_polygon_set_type<geometry_type_1,
geometry_type_2>
>,
polygon_set_view<geometry_type_1, geometry_type_2, 3>
>::type
operator-(const geometry_type_1& lvalue, const geometry_type_2& rvalue) {
return polygon_set_view<geometry_type_1, geometry_type_2, 3>
(lvalue, rvalue);
}
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk