Opened 9 years ago

Closed 9 years ago

#3084 closed Bugs (fixed)

integer_traits for std::streamsize not defined for Visual C++ in 64-bit when language extensions are off

Reported by: boost@… Owned by: Daryle Walker
Milestone: Boost 1.40.0 Component: integer
Version: Boost 1.39.0 Severity: Showstopper
Keywords: Cc:


The following does not compile if you disable language extensions and build in 64-bit:

#include <boost/integer_traits.hpp>
#include <iostream>

int main()

This makes it impossible to use boost date_time in 64-bit.

The fix is below (add to integer_traits.hpp):

#if defined(BOOST_HAS_MS_INT64) && !defined(_MSC_EXTENSIONS)
class integer_traits< __int64 >
    : public std::numeric_limits< __int64 >,
      public detail::integer_traits_base< __int64, _I64_MIN	, _I64_MAX>
{ };

Change History (3)

comment:1 Changed 9 years ago by boost@…

By the way, the error occurs when compiling greg_month.cpp in 64-bit without language extensions.

comment:2 Changed 9 years ago by anonymous

Component: date_timeinteger
Owner: changed from az_sw_dude to Daryle Walker

comment:3 Changed 9 years ago by John Maddock

Resolution: fixed
Status: newclosed

(In [57863]) Add support for MS style int64 when long long is not available. Fixes #3084.

Note: See TracTickets for help on using tickets.