Boost logo

Boost :

Subject: Re: [boost] [polygon] examplefile compilation failed
From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2009-08-31 17:15:27

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.


Boost list run by bdawes at, gregod at, cpdaniel at, john at