2nd draft with zero errors from Inspect.

This commit is contained in:
pabristow
2015-01-28 17:06:04 +00:00
parent b82f5a792b
commit 0c86f9a11a
9 changed files with 2617 additions and 131 deletions
+3 -5
View File
@@ -7,12 +7,12 @@
// See http://www.boost.org for updates, documentation, and revision history.
//! \file
//! \brief Evaluate Greatest Common Divisor at compile-time.
//! \brief Evaluate Greatest Common Divisor and Least Common Multiple at compile-time.
#ifndef BOOST_INTEGER_COMMON_FACTOR_CT_HPP
#define BOOST_INTEGER_COMMON_FACTOR_CT_HPP
//#include <boost/integer_fwd.hpp> // self include
#include <boost/integer_fwd.hpp> // Include for declaration of static_gcd_type and static_gcd.
#include <boost/config.hpp> // for BOOST_STATIC_CONSTANT, etc.
#include <boost/cstdint.hpp> // for boost::uintmax_t
@@ -20,9 +20,7 @@ namespace boost
{
namespace integer
{
// Warning: this is from 1.58 in namespace boost::integer and no longer in namespace boost::math.
typedef boost::uintmax_t static_gcd_type;
// Warning: From 1.58 this is in namespace boost::integer and no longer in namespace boost::math.
// Implementation details --------------------------------------------------//
//! \cond DETAIL
+15 -7
View File
@@ -17,35 +17,43 @@
#ifndef BOOST_INTEGER_COMMON_FACTOR_RT_HPP
#define BOOST_INTEGER_COMMON_FACTOR_RT_HPP
#include <boost/integer_fwd.hpp> // self include
#include <boost/config.hpp> // for BOOST_NESTED_TEMPLATE, etc.
#include <boost/limits.hpp> // for std::numeric_limits
#include <climits> // for CHAR_MIN
#include <boost/detail/workaround.hpp>
#include <boost/integer_fwd.hpp> // Include for declarations of gcd_evaluator and lcm_evaluator.
#include <climits> // for CHAR_MIN
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4127 4244) // Conditional expression is constant
#endif
// Warning: this is from 1.58 in namespace boost::integer and no longer in namespace boost::math.
namespace boost
{
namespace integer
{
// Warning: this is from 1.58 in namespace boost::interger and no longer in namespace boost::math.
// Forward declarations copied from <boost/math/common_factor_rt.hpp> at 1.58 -----//
// Forward declarations for function templates -----------------------------//
template < typename IntegerType >
IntegerType gcd( IntegerType const &a, IntegerType const &b );
IntegerType gcd( IntegerType const &a, IntegerType const &b );
template < typename IntegerType >
IntegerType lcm( IntegerType const &a, IntegerType const &b );
IntegerType lcm( IntegerType const &a, IntegerType const &b );
// Greatest common divisor evaluator class declaration ---------------------//
template < typename IntegerType >
class gcd_evaluator;
template < typename IntegerType >
class lcm_evaluator;
template < typename IntegerType >
class gcd_evaluator
{
+3 -1
View File
@@ -18,7 +18,6 @@
#include <boost/limits.hpp> // for std::numeric_limits
#include <boost/cstdint.hpp> // For intmax_t
namespace boost
{
@@ -160,6 +159,8 @@ template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Valu
template <static_min_max_unsigned_type Value1, static_min_max_unsigned_type Value2>
struct static_unsigned_max;
namespace integer
{
// From <boost/integer/common_factor_ct.hpp>
@@ -182,6 +183,7 @@ template < typename IntegerType >
template < typename IntegerType >
class lcm_evaluator;
] // namespace integer
} // namespace boost