Skip to content

Commit 8e41f40

Browse files
committed
Cleanups.
1 parent 72967ed commit 8e41f40

3 files changed

Lines changed: 6 additions & 7 deletions

File tree

numerics/elementary_functions_body.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ Product<Q1, Q2> FusedMultiplyAdd(Q1 const& x,
4343
return x * y + z;
4444
}
4545

46-
template<typename Q>
46+
template<cpp_number Q>
4747
Q Abs(Q const& x) {
4848
return abs(x);
4949
}
5050

51-
template<typename Q>
51+
template<cpp_number Q>
5252
Q Round(Q const& x) {
5353
// TODO(phl): This is clunky. Use `divide_qr` or something.
5454
return static_cast<Q>(round(static_cast<cpp_bin_float_50>(x)));

quantities/cantor.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ using namespace boost::multiprecision;
1414
using namespace principia::base::_traits;
1515

1616
// The `cpp_` concepts should be used sparingly, and only in places where the
17-
// Boost multiprecision API differs from our or from the standard C++ API. At
17+
// Boost multiprecision API differs from ours or from the standard C++ API. At
1818
// any rate, the multiprecision traits should never be used directly.
1919

2020
template<typename T>
@@ -45,12 +45,11 @@ concept continuum = std::floating_point<T> || cpp_bin_float<T>;
4545

4646
} // namespace internal
4747

48+
// `cpp_int` and `cpp_rational` are not exported on purpose.
4849
using internal::continuum;
4950
using internal::countable;
5051
using internal::cpp_bin_float;
51-
using internal::cpp_int;
5252
using internal::cpp_number;
53-
using internal::cpp_rational;
5453
using internal::discrete;
5554

5655
} // namespace _cantor

quantities/generators_body.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ struct NthRootGenerator<Quantity<D>, n> : not_constructible {
4848
};
4949

5050
// NOTE(phl): This is designed so that we can write something like `Sqrt(2)`.
51-
template<typename Q, int n>
52-
requires dimensionless<Q>
51+
template<dimensionless Q, int n>
5352
struct NthRootGenerator<Q, n> : not_constructible {
53+
// TODO(phl): This is not what we want for things like Boost types.
5454
using Type = double;
5555
};
5656

0 commit comments

Comments
 (0)