Ticket #3084 (closed Bugs: fixed)

Opened 7 years ago

Last modified 6 years ago

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

Reported by: boost@… Owned by: dlwalker
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

comment:1 Changed 7 years ago by boost@…

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

comment:2 Changed 6 years ago by anonymous

  • Owner changed from az_sw_dude to dlwalker
  • Component changed from date_time to integer

comment:3 Changed 6 years ago by johnmaddock

  • Status changed from new to closed
  • Resolution set to fixed

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


Add a comment

Modify Ticket

Change Properties
<Author field>
as closed
The resolution will be deleted. Next status will be 'reopened'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.