Skip to content

Commit 637e2d7

Browse files
committed
De-anonymize anonymous namespace in uint128.inl; update code with needed qualifications where missing as a result of de-anonymization.
1 parent bb74383 commit 637e2d7

File tree

3 files changed

+574
-572
lines changed

3 files changed

+574
-572
lines changed

example_code/src/uint128_example/program.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ namespace cjm::uint128::example_code
7070
{
7171
using uint128_t = numerics::uint128;
7272
using divmod_result_t = uint128_t ::divmod_result_t;
73-
using namespace uint128_literals;
73+
using namespace numerics::uint128_literals;
7474
using namespace std::string_literals;
7575
using namespace std::string_view_literals;
7676
using std::cout;
7777
constexpr auto newl = '\n';
7878

79-
template<concepts::character Char>
79+
template<cjm::numerics::concepts::character Char>
8080
std::basic_stringstream<Char, std::char_traits<Char>, std::allocator<Char>> make_throwing_sstream();
8181

82-
template<concepts::unsigned_integer Ui, concepts::character Char = char>
82+
template<cjm::numerics::concepts::unsigned_integer Ui, cjm::numerics::concepts::character Char = char>
8383
std::basic_string<Char> print_max_digits10();
8484

8585

@@ -136,14 +136,14 @@ namespace cjm::uint128::example_code
136136
return val + 1;
137137
}
138138

139-
template<concepts::character Char>
139+
template<cjm::numerics::concepts::character Char>
140140
std::basic_stringstream<Char, std::char_traits<Char>, std::allocator<Char>> make_throwing_sstream()
141141
{
142142
auto ret = std::basic_stringstream<Char>{};
143143
ret.exceptions(std::ios::failbit | std::ios::badbit);
144144
return ret;
145145
}
146-
template<concepts::unsigned_integer Ui, concepts::character Char>
146+
template<cjm::numerics::concepts::unsigned_integer Ui, cjm::numerics::concepts::character Char>
147147
std::basic_string<Char> print_max_digits10()
148148
{
149149
auto strm = make_throwing_sstream<Char>();
@@ -587,6 +587,7 @@ void cjm::uint128::example_code::demonstrate_unary_operations()
587587

588588
void cjm::uint128::example_code::say_hello()
589589
{
590+
using namespace numerics;
590591
cout << "Hello, welcome to the demonstration of CJM's uint128 type!" << newl << newl;
591592
cout << "Detected compiler: [" << get_text_narrow(compiler) << "]." << newl;
592593
cout << "Calculation mode: [";
@@ -767,7 +768,7 @@ void cjm::uint128::example_code::demonstrate_constexpr_division_and_modulus()
767768
cout << "Constexpr hash of first divmod_result_t: [0x" << std::hex << std::setw(std::numeric_limits<size_t>::digits / 4) << std::setfill('0') << hash_1 << "]." << newl;
768769
cout << "Constexpr hash of second divmod_result_t: [0x" << std::hex << std::setw(std::numeric_limits<size_t>::digits / 4) << std::setfill('0') << hash_2 << "]." << newl;
769770
cout << "Their ordering: [" << ordering_text(comp_res) << "]." << newl;
770-
static_assert(concepts::nothrow_hashable<divmod_result_t> && std::totally_ordered<divmod_result_t>, "Meet nothrow hashable and totally ordered concepts.");
771+
static_assert(cjm::numerics::concepts::nothrow_hashable<divmod_result_t> && std::totally_ordered<divmod_result_t>, "Meet nothrow hashable and totally ordered concepts.");
771772
}
772773

773774
void cjm::uint128::example_code::demonstrate_compare_and_hash()
@@ -1116,10 +1117,11 @@ void cjm::uint128::example_code::demonstrate_conversions_to_from_unsigned_integr
11161117

11171118
void cjm::uint128::example_code::demonstrate_conversions_to_from_floating_points()
11181119
{
1120+
using namespace cjm::numerics;
11191121
cout << newl << "This is the to-from floating point example." << newl;
11201122

11211123
//cjm::concepts::builtin_floating_point means float, double and long double
1122-
auto print_three_way_convert = []<concepts::builtin_floating_point Float>
1124+
auto print_three_way_convert = []<cjm::numerics::concepts::builtin_floating_point Float>
11231125
(Float orig, uint128_t converted, Float back,
11241126
std::string_view float_type_name) -> void
11251127
{

0 commit comments

Comments
 (0)