Opened 13 years ago
Closed 13 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: | Owned by: | Daryle Walker | |
|---|---|---|---|
| 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
Change History (3)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
| Component: | date_time → integer |
|---|---|
| Owner: | changed from to |
comment:3 by , 13 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Note:
See TracTickets
for help on using tickets.

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