Skip to content

Commit a17135d

Browse files
authored
Merge pull request #347 from cppalliance/concepts
Implement concepts
2 parents beb2ad6 + ea1a1e1 commit a17135d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+926
-433
lines changed

include/boost/decimal/decimal128.hpp

Lines changed: 98 additions & 98 deletions
Large diffs are not rendered by default.

include/boost/decimal/decimal32.hpp

Lines changed: 99 additions & 99 deletions
Large diffs are not rendered by default.

include/boost/decimal/decimal64.hpp

Lines changed: 98 additions & 98 deletions
Large diffs are not rendered by default.

include/boost/decimal/detail/cmath/abs.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
#include <boost/decimal/fwd.hpp>
99
#include <boost/decimal/detail/config.hpp>
1010
#include <boost/decimal/detail/type_traits.hpp>
11+
#include <boost/decimal/detail/concepts.hpp>
1112
#include <type_traits>
1213
#include <cmath>
1314

14-
namespace boost { namespace decimal {
15+
namespace boost {
16+
namespace decimal {
1517

16-
template <typename T>
18+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
1719
constexpr auto abs BOOST_DECIMAL_PREVENT_MACRO_SUBSTITUTION (T rhs) noexcept
1820
-> std::enable_if_t<detail::is_decimal_floating_point_v<T>, T>
1921
{

include/boost/decimal/detail/cmath/acosh.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111

1212
#include <boost/decimal/fwd.hpp> // NOLINT(llvm-include-order)
1313
#include <boost/decimal/detail/type_traits.hpp>
14+
#include <boost/decimal/detail/concepts.hpp>
1415
#include <boost/decimal/numbers.hpp>
1516

16-
namespace boost { namespace decimal {
17+
namespace boost {
18+
namespace decimal {
1719

18-
template<typename T>
20+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
1921
constexpr auto acosh(T x) noexcept -> std::enable_if_t<detail::is_decimal_floating_point_v<T>, T>
2022
{
2123
const auto fpc = fpclassify(x);

include/boost/decimal/detail/cmath/asinh.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111

1212
#include <boost/decimal/fwd.hpp> // NOLINT(llvm-include-order)
1313
#include <boost/decimal/detail/type_traits.hpp>
14+
#include <boost/decimal/detail/concepts.hpp>
1415
#include <boost/decimal/numbers.hpp>
1516

16-
namespace boost { namespace decimal {
17+
namespace boost {
18+
namespace decimal {
1719

18-
template<typename T>
20+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
1921
constexpr auto asinh(T x) noexcept -> std::enable_if_t<detail::is_decimal_floating_point_v<T>, T> // NOLINT(misc-no-recursion)
2022
{
2123
T result { };

include/boost/decimal/detail/cmath/atanh.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111

1212
#include <boost/decimal/fwd.hpp> // NOLINT(llvm-include-order)
1313
#include <boost/decimal/detail/type_traits.hpp>
14+
#include <boost/decimal/detail/concepts.hpp>
1415
#include <boost/decimal/numbers.hpp>
1516

16-
namespace boost { namespace decimal {
17+
namespace boost {
18+
namespace decimal {
1719

18-
template<typename T>
20+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
1921
constexpr auto atanh(T x) noexcept -> std::enable_if_t<detail::is_decimal_floating_point_v<T>, T>
2022
{
2123
T result { };

include/boost/decimal/detail/cmath/ceil.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,16 @@
1010
#include <boost/decimal/detail/type_traits.hpp>
1111
#include <boost/decimal/detail/power_tables.hpp>
1212
#include <boost/decimal/detail/apply_sign.hpp>
13+
#include <boost/decimal/detail/concepts.hpp>
1314
#include <boost/decimal/detail/cmath/fpclassify.hpp>
1415
#include <boost/decimal/detail/cmath/frexp10.hpp>
1516
#include <type_traits>
1617
#include <cmath>
1718

18-
namespace boost { namespace decimal {
19+
namespace boost {
20+
namespace decimal {
1921

20-
template <typename T>
22+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
2123
constexpr auto ceil BOOST_DECIMAL_PREVENT_MACRO_SUBSTITUTION (T val) noexcept
2224
-> std::enable_if_t<detail::is_decimal_floating_point_v<T>, T>
2325
{

include/boost/decimal/detail/cmath/cos.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,18 @@
99
#include <boost/decimal/fwd.hpp>
1010
#include <boost/decimal/numbers.hpp>
1111
#include <boost/decimal/detail/type_traits.hpp>
12+
#include <boost/decimal/detail/concepts.hpp>
1213
#include <boost/decimal/detail/cmath/cos.hpp>
1314
#include <boost/decimal/detail/cmath/remquo.hpp>
1415
#include <boost/decimal/detail/cmath/impl/sin_impl.hpp>
1516
#include <boost/decimal/detail/cmath/impl/cos_impl.hpp>
1617
#include <type_traits>
1718
#include <cstdint>
1819

19-
namespace boost { namespace decimal {
20+
namespace boost {
21+
namespace decimal {
2022

21-
template<typename T>
23+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
2224
constexpr auto cos(T x) noexcept -> std::enable_if_t<detail::is_decimal_floating_point_v<T>, T> // NOLINT(misc-no-recursion)
2325
{
2426
T result { };

include/boost/decimal/detail/cmath/cosh.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111

1212
#include <boost/decimal/fwd.hpp> // NOLINT(llvm-include-order)
1313
#include <boost/decimal/detail/type_traits.hpp>
14+
#include <boost/decimal/detail/concepts.hpp>
1415
#include <boost/decimal/numbers.hpp>
1516

16-
namespace boost { namespace decimal {
17+
namespace boost {
18+
namespace decimal {
1719

18-
template<typename T>
20+
template <BOOST_DECIMAL_DECIMAL_FLOATING_TYPE T>
1921
constexpr auto cosh(T x) noexcept -> std::enable_if_t<detail::is_decimal_floating_point_v<T>, T> // NOLINT(misc-no-recursion)
2022
{
2123
const auto fpc = fpclassify(x);

0 commit comments

Comments
 (0)