mirror of
https://github.com/boostorg/safe_numerics.git
synced 2026-02-12 12:22:16 +00:00
More carefully defined the concepts. That is the concept of the library is now clear: Trap at either compile or runtime integer operations which yield a result which differs from the normal arithmetic result. Pending on this check in: a) only addition is fixed up so far b) uses BOOST_TYPEOF... rather than decltype(... - final decision sill pending. c) comments out some compile time checks which should be re-instated. d) fixed tests so that they actually work!
18 lines
425 B
C++
18 lines
425 B
C++
// Copyright (c) 2012 Robert Ramey
|
|
//
|
|
// 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 "test_subtract.hpp"
|
|
|
|
#define TESTX(a, b) \
|
|
rval &= test_subtract(a, b, BOOST_PP_STRINGIZE(a), BOOST_PP_STRINGIZE(b));
|
|
/**/
|
|
|
|
int main(int argc, char * argv[]){
|
|
bool rval = true;
|
|
TEST_ALL
|
|
return ! rval ;
|
|
}
|