Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: boostorg/boost-ci/.github/workflows/reusable.yml@master
with:
exclude_compiler: 'clang-3.5,clang-3.6,clang-3.7,clang-3.8,clang-3.9,clang-4.0,clang-5.0,clang-6.0,clang-7,
clang-8,clang-9,clang-10,clang-11,clang-12
clang-8,clang-9,clang-10,clang-11,clang-12,
gcc-4.7,gcc-4.8,gcc-4.9,gcc-5,gcc-6,gcc-7,gcc-8,gcc-9,gcc-10'
# Example of customization:
# with:
Expand Down
1 change: 1 addition & 0 deletions include/boost/safe_numbers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#define BOOST_SAFENUMBERS_HPP

#include <boost/safe_numbers/unsigned_integers.hpp>
#include <boost/safe_numbers/signed_integers.hpp>
#include <boost/safe_numbers/bounded_integers.hpp>
#include <boost/safe_numbers/iostream.hpp>
#include <boost/safe_numbers/limits.hpp>
Expand Down
96 changes: 96 additions & 0 deletions include/boost/safe_numbers/detail/int128/random.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
// Copyright 2026 Matt Borland
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt

#ifndef BOOST_SAFE_NUMBERS_DETAIL_INT128_RANDOM_HPP
#define BOOST_SAFE_NUMBERS_DETAIL_INT128_RANDOM_HPP

#include "int128.hpp"

namespace boost {
namespace random {
namespace traits {

template <class T, bool intrinsic>
struct make_unsigned_imp;

template <>
struct make_unsigned_imp<int128::uint128_t, false>
{
using type = int128::uint128_t;
};

template <>
struct make_unsigned_imp<int128::int128_t, false>
{
using type = int128::uint128_t;
};

template <class T>
struct make_unsigned;

template <>
struct make_unsigned<int128::uint128_t>
{
using type = int128::uint128_t;
};

template <>
struct make_unsigned<int128::int128_t>
{
using type = int128::int128_t;
};

template <class T, bool intrinsic>
struct make_unsigned_or_unbounded_imp;

template <>
struct make_unsigned_or_unbounded_imp<int128::uint128_t, false>
{
using type = int128::uint128_t;
};

template <>
struct make_unsigned_or_unbounded_imp<int128::int128_t, false>
{
using type = int128::uint128_t;
};

template <class T>
struct make_unsigned_or_unbounded;

template <>
struct make_unsigned_or_unbounded<int128::uint128_t>
{
using type = int128::uint128_t;
};

template <>
struct make_unsigned_or_unbounded<int128::int128_t>
{
using type = int128::uint128_t;
};

template <class T>
struct is_integral;

template <>
struct is_integral<int128::uint128_t> : std::true_type {};

template <>
struct is_integral<int128::int128_t> : std::true_type {};

template <class T>
struct is_signed;

template <>
struct is_signed<int128::uint128_t> : std::false_type {};

template <>
struct is_signed<int128::int128_t> : std::true_type {};

} // namespace traits
} // namespace random
} // namespace boost

#endif //BOOST_SAFE_NUMBERS_DETAIL_INT128_RANDOM_HPP
Loading