@@ -70,16 +70,16 @@ namespace cjm::uint128::example_code
70
70
{
71
71
using uint128_t = numerics::uint128;
72
72
using divmod_result_t = uint128_t ::divmod_result_t ;
73
- using namespace uint128_literals ;
73
+ using namespace numerics :: uint128_literals;
74
74
using namespace std ::string_literals;
75
75
using namespace std ::string_view_literals;
76
76
using std::cout;
77
77
constexpr auto newl = ' \n ' ;
78
78
79
- template <concepts::character Char>
79
+ template <cjm::numerics:: concepts::character Char>
80
80
std::basic_stringstream<Char, std::char_traits<Char>, std::allocator<Char>> make_throwing_sstream ();
81
81
82
- template <concepts::unsigned_integer Ui, concepts::character Char = char >
82
+ template <cjm::numerics:: concepts::unsigned_integer Ui, cjm::numerics:: concepts::character Char = char >
83
83
std::basic_string<Char> print_max_digits10 ();
84
84
85
85
@@ -136,14 +136,14 @@ namespace cjm::uint128::example_code
136
136
return val + 1 ;
137
137
}
138
138
139
- template <concepts::character Char>
139
+ template <cjm::numerics:: concepts::character Char>
140
140
std::basic_stringstream<Char, std::char_traits<Char>, std::allocator<Char>> make_throwing_sstream ()
141
141
{
142
142
auto ret = std::basic_stringstream<Char>{};
143
143
ret.exceptions (std::ios::failbit | std::ios::badbit);
144
144
return ret;
145
145
}
146
- template <concepts::unsigned_integer Ui, concepts::character Char>
146
+ template <cjm::numerics:: concepts::unsigned_integer Ui, cjm::numerics:: concepts::character Char>
147
147
std::basic_string<Char> print_max_digits10 ()
148
148
{
149
149
auto strm = make_throwing_sstream<Char>();
@@ -587,6 +587,7 @@ void cjm::uint128::example_code::demonstrate_unary_operations()
587
587
588
588
void cjm::uint128::example_code::say_hello ()
589
589
{
590
+ using namespace numerics ;
590
591
cout << " Hello, welcome to the demonstration of CJM's uint128 type!" << newl << newl;
591
592
cout << " Detected compiler: [" << get_text_narrow (compiler) << " ]." << newl;
592
593
cout << " Calculation mode: [" ;
@@ -767,7 +768,7 @@ void cjm::uint128::example_code::demonstrate_constexpr_division_and_modulus()
767
768
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;
768
769
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;
769
770
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." );
771
772
}
772
773
773
774
void cjm::uint128::example_code::demonstrate_compare_and_hash ()
@@ -1116,10 +1117,11 @@ void cjm::uint128::example_code::demonstrate_conversions_to_from_unsigned_integr
1116
1117
1117
1118
void cjm::uint128::example_code::demonstrate_conversions_to_from_floating_points ()
1118
1119
{
1120
+ using namespace cjm ::numerics;
1119
1121
cout << newl << " This is the to-from floating point example." << newl;
1120
1122
1121
1123
// 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>
1123
1125
(Float orig, uint128_t converted, Float back,
1124
1126
std::string_view float_type_name) -> void
1125
1127
{
0 commit comments