Re: [Boost-users] Support __int64 and usigned __int64 in concept check interger type
On Mon, 17 Sep 2007 14:33:53 -0400, Doug Gregor wrote:
On Sep 17, 2007, at 10:25 AM, thomas free wrote:
************************************ //Change here
#ifdef _WIN64
template <> struct IntegerConcept<__int64> { void constraints() {} };
template <> struct IntegerConcept<unsigned __int64> { void constraints() {} };
#endif
************************************
#endif
When I put this two lines, the code compile and link has well has on Win32 platform
Those look fine; I've updated the Boost trunk accordingly.
That's not going to help other 64-bit platforms like Linux, or for the use of 64-bit types like 'long long' on 32-bit systems. We've been bitten in the past by large discrepancies between IntegerConcept and is_integral in the type_traits library. Is there a reason why IntegerConcept doesn't just use is_integral? At the very least, it would be nice if the two had consistent answers for all types. -Chris
Chris Newbold wrote:
When I put this two lines, the code compile and link has well has on Win32 platform
Those look fine; I've updated the Boost trunk accordingly.
That's not going to help other 64-bit platforms like Linux, or for the use of 64-bit types like 'long long' on 32-bit systems.
Right: the normal invocation is: #ifdef BOOST_HAS_LONG_LONG // (unsigned) long long specialisation here #elif defined (BOOST_HAS_MS_INT64) // (unsigned) __int64 specialistion here. #endif Note that the current code will likely break on recent msvc versions because "long long" and __int64 are the same type, but you have specialisations for both :-( HTH, John.
Hi ! An'n Dienstag 18 September 2007 hett John Maddock schreven:
Note that the current code will likely break on recent msvc versions because "long long" and __int64 are the same type, but you have specialisations for both :-(
It _does_ break msvc :-(( See error attached. I'm using msvc-8.0 without SP1. That just broke my experimental 64-bit builds. Just ping me if you need someone to test a patch... Yours, Jürgen -- * Dipl.-Math. Jürgen Hunold ! Ingenieurgesellschaft für * voice: ++49 511 262926 57 ! Verkehrs- und Eisenbahnwesen mbH * fax : ++49 511 262926 99 ! Lister Straße 15 * juergen.hunold@ivembh.de ! www.ivembh.de * * Geschäftsführer: ! Sitz des Unternehmens: Hannover * Prof. Dr.-Ing. Thomas Siefer ! Amtsgericht Hannover, HRB 56965 * PD Dr.-Ing. Alfons Radtke !
On Tue, 2007-09-18 at 11:52 +0200, Jürgen Hunold wrote:
Hi !
An'n Dienstag 18 September 2007 hett John Maddock schreven:
Note that the current code will likely break on recent msvc versions because "long long" and __int64 are the same type, but you have specialisations for both :-(
It _does_ break msvc :-(( See error attached. I'm using msvc-8.0 without SP1.
That just broke my experimental 64-bit builds.
Drat, sorry. I've committed a fix to Subversion. - Doug
participants (4)
-
Chris Newbold
-
Douglas Gregor
-
John Maddock
-
Jürgen Hunold