mirror of
https://github.com/boostorg/integer.git
synced 2025-11-03 09:41:37 +01:00
Fix integer.hpp so a compiler error is generated when the number of bits requested is greater than the max available.
Added new tests to catch this case. [SVN r78307]
This commit is contained in:
8
test/fail_uint_least.cpp
Normal file
8
test/fail_uint_least.cpp
Normal file
@@ -0,0 +1,8 @@
|
||||
// Copyright John Maddock 2012.
|
||||
// Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/integer.hpp>
|
||||
|
||||
typedef boost::uint_t<sizeof(boost::intmax_t)*CHAR_BIT + 1>::least fail_uint_least;
|
||||
Reference in New Issue
Block a user