2
0
mirror of https://github.com/boostorg/integer.git synced 2026-01-20 04:32:36 +00:00

Compare commits

..

9 Commits

Author SHA1 Message Date
Beman Dawes
eb945cc3bf Release 1.41.0
[SVN r57747]
2009-11-18 14:58:26 +00:00
Troy D. Straszheim
be17e798df rm cmake from the release branch before it goes out broken. Policy dictates that you never commit to release, you commit to trunk and merge to release.
[SVN r56941]
2009-10-17 01:10:45 +00:00
Troy D. Straszheim
a1bf7131b3 Add basic copyright/license to keep cmake out of the inspection report
[SVN r55095]
2009-07-22 21:51:01 +00:00
Daniel James
dcdfca5f38 Use BOOST_STATIC_CONSTANT in static_log2, as g++ 4.0 has problems with enum.
Merged revisions 54811 via svnmerge from 
https://svn.boost.org/svn/boost/trunk


[SVN r54911]
2009-07-12 16:11:26 +00:00
Boris Gubenko
12e2311aa4 add missing #include to integer_mask_test.cpp
[SVN r50935]
2009-01-31 21:37:54 +00:00
Troy D. Straszheim
e6bbb33660 merge of cmake build files from trunk per beman
[SVN r50756]
2009-01-24 18:57:20 +00:00
Beman Dawes
1b9549693a Merge from trunk
[SVN r50681]
2009-01-20 01:54:06 +00:00
John Maddock
382eabdff5 fixes #2654.
[SVN r50573]
2009-01-14 10:18:19 +00:00
Boris Gubenko
3531eb1ac5 merge tests and Jamfiles for 7 libraries
[SVN r50456]
2009-01-04 05:17:02 +00:00
7 changed files with 24 additions and 5 deletions

View File

@@ -36,7 +36,7 @@
// this is triggered with GCC, because it defines __cplusplus < 199707L
# define BOOST_NO_INT64_T
# endif
# elif defined(__FreeBSD__) || defined(__IBMCPP__)
# elif defined(__FreeBSD__) || defined(__IBMCPP__) || defined(_AIX)
# include <inttypes.h>
# else
# include <stdint.h>

View File

@@ -48,7 +48,7 @@ namespace boost {
template <result_type n>
struct choose_initial_n {
enum { c = (argument_type(1) << n << n) != 0 };
BOOST_STATIC_CONSTANT(bool, c = (argument_type(1) << n << n) != 0);
BOOST_STATIC_CONSTANT(
result_type,
value = !c*n + choose_initial_n<2*c*n>::value
@@ -85,7 +85,7 @@ namespace boost {
template <argument_type x, result_type n = initial_n>
struct static_log2_impl {
enum { c = (x >> n) > 0 }; // x >= 2**n ?
BOOST_STATIC_CONSTANT(bool, c = (x >> n) > 0); // x >= 2**n ?
BOOST_STATIC_CONSTANT(
result_type,
value = c*n + (static_log2_impl< (x>>c*n), n/2 >::value)

20
test/Jamfile.v2 Normal file
View File

@@ -0,0 +1,20 @@
#~ Copyright Rene Rivera 2008
#~ 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)
import testing ;
test-suite integer
: [ run cstdint_test.cpp ]
[ run integer_test.cpp
/boost/test//boost_unit_test_framework ]
[ run integer_traits_test.cpp
/boost/test//boost_test_exec_monitor/<link>static ]
[ run integer_mask_test.cpp
/boost/test//boost_unit_test_framework ]
[ run static_log2_test.cpp
/boost/test//boost_test_exec_monitor/<link>static ]
[ run static_min_max_test.cpp
/boost/test//boost_test_exec_monitor/<link>static ]
# [ compile issue_2134.cpp ]
;

View File

@@ -10,8 +10,7 @@
// Revision History
// 23 Sep 2001 Initial version (Daryle Walker)
#define BOOST_INCLUDE_MAIN
#include <boost/test/test_tools.hpp> // for main
#include <boost/test/minimal.hpp> // for main
#include <boost/cstdlib.hpp> // for boost::exit_success
#include <boost/integer/integer_mask.hpp> // for boost::high_bit_mask_t, etc.