Boost logo

Boost :

Subject: Re: [boost] [polygon] MSVC9
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2009-08-31 17:25:26


Simonson, Lucanus J wrote:
> Thomas Klimpel wrote:
>> Joachim Faulhaber wrote:
>>> after replacing
>>> gtl::
>>> by
>>> boost::polygon::
>>> and
>>> namespace gtl { ... }
>>> by
>>> namespace boost { namespace polygon { ... } }
>>>
>>> and adding
>>>
>>> typedef int coordinate_type;
>>>
>>> to struct CPoint
>>>
>>> the code finally compiled.
>>> Are these examples intended to be excercises ;)
>>
>> Did you realize that they are extremely challenging exercises?
>> Replacing" namespace gtl { ... }" by "namespace boost { namespace
>> polygon { ... } }" is correct and sufficient to make the files
>> compile with gcc compilers. (As you can guess, this got broken when
>> the library was renamed from gtl to boost::polygon.)
>>
>> The challenging part is to make the examples compile with msvc-9, by
>> introducing the correct workarounds in the code of the library
>> itself. I had hoped that Steven Wantanabe would try to face this
>> challenge, because it looks as if he was the one who helped fix the
>> other msvc issues. So I counted this compile-failure as a test
>> coverage issue of the unit-tests in my review.
>
> You guys are right that the examples got out of date when I changed
> the gtl namespace to boost::polygon. I'll fix those right away. The
> other issue is with compile errors in MSVC9 when using custom types
> vs. library types. It turns out that I broke MSVC9 compatibility
> when I back ported to MSVC8. You shouldn't need to add typedef int
> coordinate_type to CPoint, the problem is that it is not applying
> SFINAE at the right point in the instantiation of the interval
> concept overloads of functions I'm using from the point concept. To
> fix this I need to modify the declarations within the library so that
> MSVC8 and MSVC9 will both work. I all likelyhood I inadvertantly
> removed a MSVC9 specific workaround that just needs to be
> reintroduced. I do plan on fixing that issue as soon as possible.

It turns out that the SFINAE inducing null pointer default argument MSVC8 workaround breaks the build in MSVC9 if the arguments that come before instantiate templates which generate syntax errors. I know how to fix the issue by using the return argument MSVC8 SFINAE workaround, and should have the examples compiling in MSVC9 by the end of the day.

Luke


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk