53 uint64_t u64_1 = 1116791496961ull;
54 void * p_v_1 = (
void *)0xAFFE;
55 float float_1 = 1.65f;
59 CHECK(
"1" == jau::to_string<int>(i1) );
61 if(
sizeof(p_v_1) == 8 ) {
63 }
else if(
sizeof(p_v_1) == 4 ) {
82 vec_int_1.push_back(1); vec_int_1.push_back(2); vec_int_1.push_back(3);
84 uint8_t* vec_int_citer_1B_ptr = (uint8_t*)(vec_int_citer_1B.operator->());
85 std::string vec_int_citer_1B_str =
to_hexstring(vec_int_citer_1B_ptr);
88 uint8_t* vec_int_citer_1E_ptr = (uint8_t*)(vec_int_citer_1E.operator->());
89 std::string vec_int_citer_1E_str =
to_hexstring(vec_int_citer_1E_ptr);
91 std::ptrdiff_t vec_int_citer_1E_1B_ptrdiff = vec_int_citer_1E_ptr - vec_int_citer_1B_ptr;
92 size_t vec_int_citer_1E_1B_ptr_count = vec_int_citer_1E_1B_ptrdiff /
sizeof(int);
93 size_t vec_int_citer_1E_1B_itr_count = vec_int_citer_1E - vec_int_citer_1B;
95 printf(
"vec_int_citer_1E - vec_int_citer_1B = itr_count %zu, ptr_count %zu\n",
96 vec_int_citer_1E_1B_itr_count, vec_int_citer_1E_1B_ptr_count);
97 printf(
"vec_int_citer_1E - vec_int_citer_1B = %zu\n", vec_int_citer_1E_1B_itr_count);
98 printf(
"vec_int_citer_1B_ptr %s, vec_int_citer_1E1_ptr = %s\n", vec_int_citer_1B_str.c_str(), vec_int_citer_1E_str.c_str());
100 CHECK(vec_int_citer_1E_1B_itr_count == 3);
101 CHECK(vec_int_citer_1E_1B_itr_count == vec_int_citer_1E_1B_ptr_count);
103 CHECK( vec_int_citer_1E_str ==
jau::to_string(vec_int_citer_1E) );
std::string to_string(const endian_t v) noexcept
Return std::string representation of the given endian.
std::string to_string(const alphabet &v) noexcept
#define JAU_TYPENAME_CUE_ALL(A)
std::string to_hexstring(value_type const &v) noexcept
Produce a lower-case hexadecimal string representation of the given pointer.
__pack(...): Produces MSVC, clang and gcc compatible lead-in and -out macros.
Checker for member of pointer '->' operator with convertible pointer return, no arguments.
int printf(const char *format,...)
Operating Systems predefined macros.
TEST_CASE("JAU to_string() Test 00 - jau::to_string() std::string conversion", "[jau][std::string][to_string()]")
std::vector< int > std_vec_int
std_vec_int_citer::pointer std_vec_int_citer_pointer
decltype(std::declval< std_vec_int_citer >().operator->()) std_vec_int_citer_ptrop_retval
std_vec_int::const_iterator std_vec_int_citer
std_vec_int::iterator std_vec_int_iter