integer.hpp 678 B

123456789101112131415161718192021222324252627
  1. #ifndef BOOST_NUMERIC_CONCEPT_INTEGER_HPP
  2. #define BOOST_NUMERIC_CONCEPT_INTEGER_HPP
  3. // Copyright (c) 2012 Robert Ramey
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. #include "numeric.hpp"
  9. namespace boost {
  10. namespace safe_numerics {
  11. template <class T>
  12. class Integer : public Numeric<T> {
  13. // integer types must have the corresponding numeric trait.
  14. static_assert(
  15. std::numeric_limits<T>::is_integer,
  16. "Fails to fulfill requirements for an integer type"
  17. );
  18. };
  19. } // safe_numerics
  20. } // boost
  21. #endif // BOOST_NUMERIC_CONCEPT_INTEGER_HPP