
On 8/10/07, Maximilian Albert <Anhalter42@...173...> wrote:
MenTaLguY schrieb:
On Thu, 2007-08-09 at 08:50 -0700, John Faith wrote:
I played with this a bit, and found that the problem is not related to the namespace nor to the fact that the struct has no members.
NR::Nothing should have parenthesis, as it is constructing a value; e.g. NR::Nothing(). I think this is a typo in the SVN version.
The SVN version has these parentheses. Actually, I'm a bit confused since line-geometry.cpp is one of the files I added in revision 15169, but I didn't touch it since then, and it compiles flawlessly here ever since. Also, given that revision 15634 (the one where John's problem occurred) is already one week old, I guess there would have been complaints if it didn't compile. Is anyone else seeing this?
Max
Oops, my example was wrong (thanks for pointing that out), and adding the parens in my example fixes it, but line-geometry.cpp is still failing for me.
The line:
g_return_val_if_fail(fabs(denom) > 1e-6, NR::Nothing());
is causing the failure, and if I replace it with these 2 lines:
NR::MaybeNR::Point no_point = NR::Nothing(); g_return_val_if_fail(fabs(denom) > 1e-6, no_point);
, then the compiler is for some reason happier. Not sure if this is a reasonable thing to patch on all platforms or if this should get a gcc3/apple ifdef. I made this change just in line-geometry.cpp and was able to get through the whole build.
, John