Modify

Ticket #3084 (closed Bugs: fixed)

Opened 5 years ago

Last modified 4 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:

Description

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

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

int main()
{
  boost::integer_traits<std::streamsize>::const_max;
}

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)
template<>
class integer_traits< __int64 >
    : public std::numeric_limits< __int64 >,
      public detail::integer_traits_base< __int64, _I64_MIN	, _I64_MAX>
{ };
#endif

Attachments

Change History

comment:1 Changed 5 years ago by boost@…

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

comment:2 Changed 5 years ago by anonymous

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

comment:3 Changed 4 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.

View

Add a comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.