Boost logo

Boost :

Subject: Re: [boost] [Polygon] review - isotropy.hpp
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-08-31 09:24:40

Simonson, Lucanus J wrote:
> Steven Watanabe wrote:
> > isotropy.hpp:308
> > What does y_c_edist mean, and why are you including a
> > constant in the gtl_and for euclidean_distance?
> This is a compiler workaround for MSVC8. There are a large
> number of them, unfortuantely. It is named with a mangling
> scheme related to the concept and function name that uses it.
> MSVC8 has two different code paths for instantiating
> templates and applying SFINAE. The one where it recognizes
> that it has seen a subtemplate before is incorrect and I used
> these constant types that are unique to each function to
> force MSVC8 to SFINAE correctly. I could perhaps put a
> //MSVC8 workaround
> on each one so that it doesn't cause too much confusion.

(Caveat: I'm only responding to what I read here: I haven't looked at the code in question. I may be way off the mark.)

How about introducing a macro taking a constant argument, that evaluates to the supplied constant, plus required punctuation, for MSVC8 and to nothing for other compilers? That would make the code self documenting and eliminate any #ifdef's where used.


Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

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