[numeric] Adding numeric_cast_traits.hpp on 08/11 (today) breaks trunk

The addition and integration of numeric_cast_traits.hpp to boost numeric is breaking compiles on the trunk which use numeric. I am attempting to compile quickbook, only to see: gcc.compile.c++ ..\..\bin.v2\tools\quickbook\src\gcc-mingw-4.6.0\release\link-st atic\quickbook.o gcc.compile.c++ ..\..\bin.v2\tools\quickbook\src\gcc-mingw-4.6.0\release\link-st atic\actions.o In file included from ..\../boost/numeric/conversion/numeric_cast_traits.hpp:28: 0, from ..\../boost/numeric/conversion/cast.hpp:34, from ..\../boost/lexical_cast.hpp:40, from src\actions.cpp:19: ..\../boost/numeric/conversion/detail/numeric_cast_traits.hpp:77:31: error: miss ing binary operator before token "(" ..\../boost/numeric/conversion/detail/numeric_cast_traits.hpp:82:31: error: miss ing binary operator before token "(" etc. The same errors occur with msvc-10.0. These changes need to be fixed or reverted. Too many things depend on numeric_cast for this to remain broken.

On 8/12/2011 2:57 AM, Daniel James wrote:
On 12 August 2011 03:43, Edward Diener<eldiener@tropicsoft.com> wrote:
These changes need to be fixed or reverted. Too many things depend on numeric_cast for this to remain broken.
I checked in a quick fix. Hopefully I haven't stepped on anyone's toes.
Thanks :). I'm looking at the fix and don't understand why #elif was breaking there. I did my compiles on msvc-10 and gcc-4.3.4/cygwin with no issues. Cheers, Brandon

On 12 August 2011 13:20, Brandon Kohn <blkohn@hotmail.com> wrote:
Thanks :). I'm looking at the fix and don't understand why #elif was breaking there. I did my compiles on msvc-10 and gcc-4.3.4/cygwin with no issues.
This has come up before. The problem is with code like this: #if !defined(SOMETHING) #elif SOMETHING() == 1 #endif In recent versions of gcc it fails when SOMETHING isn't defined because the 'SOMETHING() == 1' clause is always evaluated - even though the if statement has already been resolved. This is apparently compliant with the standard. The solution is to write: #if !defined(SOMETHING) #else # if SOMETHING() == 1 # endif #endif

On 8/12/2011 8:20 AM, Brandon Kohn wrote:
On 8/12/2011 2:57 AM, Daniel James wrote:
On 12 August 2011 03:43, Edward Diener<eldiener@tropicsoft.com> wrote:
These changes need to be fixed or reverted. Too many things depend on numeric_cast for this to remain broken.
I checked in a quick fix. Hopefully I haven't stepped on anyone's toes.
Thanks :). I'm looking at the fix and don't understand why #elif was breaking there. I did my compiles on msvc-10 and gcc-4.3.4/cygwin with no issues.
The failure I saw occured on msvc-10.0 as well as gcc-4.6.0 so you should revisit your tests so that they catch such a failure. Daniel James' update fixed the problem but tests should show the problem in the first place.

On 8/12/2011 9:59 AM, Edward Diener wrote:
The failure I saw occured on msvc-10.0 as well as gcc-4.6.0 so you should revisit your tests so that they catch such a failure.
It doesn't happen with my vc10 installation. When you look at your vc10 version, what does it say? Mine is Version 9.0.30729.1. I didn't test on gcc-4.6.0 as cygwin seems only to have up to 4.3.4. Otherwise, I'm not sure what else I could have done to foresee these issues. My tests really did build, and really did pass. Honest ;).
Daniel James' update fixed the problem but tests should show the problem in the first place.
I checked the trunk regression tests this morning and began to work through the issues I found. Your tone seems to suggest that I have done something incorrectly; however, I'm not sure what more I could have done. I don't have access to every compiler boost supports. I assumed that the general way of collaborating on Boost is to test on what compilers are available and then consult the regression tests at http://www.boost.org/development/tests/trunk/developer/summary.html to address those issues that exist on compilers that one does not have available. I'm not sure development on this scale could work any other way. Regards, Brandon

Brandon Kohn wrote:
On 8/12/2011 9:59 AM, Edward Diener wrote:
The failure I saw occured on msvc-10.0 as well as gcc-4.6.0 so you should revisit your tests so that they catch such a failure.
It doesn't happen with my vc10 installation. When you look at your vc10 version, what does it say? Mine is Version 9.0.30729.1.
cl.exe /version should report 16.X. Are you looking at the Visual Studio version? That should be 10.X. It would seem that you're actually using Visual Studio 2008/VC9 and looking at the Visual Studio version number. _____ Rob Stewart robert.stewart@sig.com Software Engineer using std::disclaimer; Dev Tools & Components Susquehanna International Group, LLP http://www.sig.com ________________________________ 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.

On 8/12/2011 10:21 AM, Stewart, Robert wrote:
Brandon Kohn wrote:
On 8/12/2011 9:59 AM, Edward Diener wrote:
The failure I saw occured on msvc-10.0 as well as gcc-4.6.0 so you should revisit your tests so that they catch such a failure.
It doesn't happen with my vc10 installation. When you look at your vc10 version, what does it say? Mine is Version 9.0.30729.1.
cl.exe /version should report 16.X. Are you looking at the Visual Studio version? That should be 10.X. It would seem that you're actually using Visual Studio 2008/VC9 and looking at the Visual Studio version number.
Ah, whoops. You're right. I opened the wrong IDE. (My employer's work is on vc9.) My vc10 version is: 10.0.40219.1 via the IDE's about menu. My command line gives: $ cl -v Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.

On 8/12/2011 2:57 AM, Daniel James wrote:
On 12 August 2011 03:43, Edward Diener<eldiener@tropicsoft.com> wrote:
These changes need to be fixed or reverted. Too many things depend on numeric_cast for this to remain broken.
I checked in a quick fix. Hopefully I haven't stepped on anyone's toes.
Thanks ! Your update fixed the problem.
participants (4)
-
Brandon Kohn
-
Daniel James
-
Edward Diener
-
Stewart, Robert