#6169 closed Bugs (worksforme)
integer.hpp fails to produce compiler error for large number of bits
| Reported by: | Owned by: | viboes | |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | integer |
| Version: | Boost 1.47.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
According to the documentation, when using the uint_t<Bits> template, a compile time error should be produced when asking for more bits that a native type can provide. Actual behavior compiles successfully.
std::numeric_limits<boost::uint_t<65>::least>::digits //65 produces 64 instead of a compile error. std::numeric_limits<boost::uint_t<66>::least>::digits //66 and larger numbers produce 7 instead of a compile error.
compiler: apple gcc-4.2 (xcode 4.2), macports gcc-4.6
Attachments (2)
Change History (5)
by , 11 years ago
| Attachment: | test-example.cpp added |
|---|
by , 11 years ago
| Attachment: | patch-against-1.48.0.patch added |
|---|
Patch against 1.48.0 that fixes the example for me.
comment:1 by , 8 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 8 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | assigned → closed |
The implementation has changed completely.
I have tested and it works for me now 1.57.
Note:
See TracTickets
for help on using tickets.

Sample program exposing the issue.