[libc++] Qualifies intmax_t and uintmax_t.
authorMark de Wever <koraq@xs4all.nl>
Fri, 24 Mar 2023 16:18:11 +0000 (17:18 +0100)
committerMark de Wever <koraq@xs4all.nl>
Fri, 7 Apr 2023 15:45:03 +0000 (17:45 +0200)
This has been done using the following command

  find libcxx/test -type f -exec perl -pi -e 's|^([^/]+?)((?<!::)(?<!::u)u?intmax_t)|\1std::\2|' \{} \;

The std module doesn't export declarations in the global namespaace.
This is a preparation for that module.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D146821

23 files changed:
libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
libcxx/test/std/atomics/types.pass.cpp
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.copy_file/copy_file_large.pass.cpp
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.file_size/file_size.pass.cpp
libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.hard_lk_ct/hard_link_count.pass.cpp
libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.fail.cpp
libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
libcxx/test/std/numerics/bit/bit.pow.two/bit_width.pass.cpp
libcxx/test/std/numerics/bit/bit.pow.two/has_single_bit.pass.cpp
libcxx/test/std/numerics/bit/bitops.count/countl_one.pass.cpp
libcxx/test/std/numerics/bit/bitops.count/countl_zero.pass.cpp
libcxx/test/std/numerics/bit/bitops.count/countr_one.pass.cpp
libcxx/test/std/numerics/bit/bitops.count/countr_zero.pass.cpp
libcxx/test/std/numerics/bit/bitops.count/popcount.pass.cpp
libcxx/test/std/numerics/bit/bitops.rot/rotl.pass.cpp
libcxx/test/std/numerics/bit/bitops.rot/rotr.pass.cpp
libcxx/test/std/time/time.hms/time.hms.nonmembers/ostream.pass.cpp
libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
libcxx/test/support/filesystem_test_helper.h

index 2812588..2bac7cb 100644 (file)
@@ -204,8 +204,8 @@ void f() {
   static_assert(std::is_same_v<std::atomic<std::uintptr_t>, ::atomic_uintptr_t>);
   static_assert(std::is_same_v<std::atomic<std::size_t>,    ::atomic_size_t>);
   static_assert(std::is_same_v<std::atomic<std::ptrdiff_t>, ::atomic_ptrdiff_t>);
-  static_assert(std::is_same_v<std::atomic<intmax_t>,  ::atomic_intmax_t>);
-  static_assert(std::is_same_v<std::atomic<uintmax_t>, ::atomic_uintmax_t>);
+  static_assert(std::is_same_v<std::atomic<std::intmax_t>,  ::atomic_intmax_t>);
+  static_assert(std::is_same_v<std::atomic<std::uintmax_t>, ::atomic_uintmax_t>);
 
   // Just check that the symbols in the global namespace are visible.
   using ::atomic_compare_exchange_strong;
index cb8dde0..deaa45d 100644 (file)
@@ -150,11 +150,11 @@ int main(int, char**)
     test<std::uintptr_t> ();
     test<std::size_t>    ();
     test<std::ptrdiff_t> ();
-    test<intmax_t>  ();
-    test<uintmax_t> ();
+    test<std::intmax_t>  ();
+    test<std::uintmax_t> ();
 
-    test<uintmax_t> ();
-    test<uintmax_t> ();
+    test<std::uintmax_t> ();
+    test<std::uintmax_t> ();
 
     test<TriviallyCopyable>();
     test<PaddedTriviallyCopyable>();
index 1999854..9fa44eb 100644 (file)
@@ -251,7 +251,7 @@ static void refresh_doesnt_throw_on_dne_but_reports_it() {
     TEST_DOES_NOT_THROW(ent.refresh());
 
     ec = GetTestEC();
-    assert(ent.file_size(ec) == uintmax_t(-1));
+    assert(ent.file_size(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::no_such_file_or_directory));
 
     // doesn't throw!
@@ -274,7 +274,7 @@ static void refresh_doesnt_throw_on_dne_but_reports_it() {
     assert(!ec);
 
     ec = GetTestEC();
-    assert(ent.file_size(ec) == uintmax_t(-1));
+    assert(ent.file_size(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::no_such_file_or_directory));
 
     TEST_THROWS_TYPE(filesystem_error, ent.file_size());
@@ -316,7 +316,7 @@ static void access_cache_after_refresh_fails() {
     CHECK_ACCESS(exists, false);
     CHECK_ACCESS(is_symlink, false);
     CHECK_ACCESS(last_write_time, file_time_type::min());
-    CHECK_ACCESS(hard_link_count, uintmax_t(-1));
+    CHECK_ACCESS(hard_link_count, std::uintmax_t(-1));
   }
   permissions(dir, old_perms);
   {
@@ -333,7 +333,7 @@ static void access_cache_after_refresh_fails() {
     CHECK_ACCESS(exists, false);
     CHECK_ACCESS(is_symlink, false);
     CHECK_ACCESS(last_write_time, file_time_type::min());
-    CHECK_ACCESS(hard_link_count, uintmax_t(-1));
+    CHECK_ACCESS(hard_link_count, std::uintmax_t(-1));
   }
   permissions(dir, old_perms);
   {
@@ -351,7 +351,7 @@ static void access_cache_after_refresh_fails() {
     CHECK_ACCESS(exists, false);
     CHECK_ACCESS(is_regular_file, false);
     CHECK_ACCESS(last_write_time, file_time_type::min());
-    CHECK_ACCESS(hard_link_count, uintmax_t(-1));
+    CHECK_ACCESS(hard_link_count, std::uintmax_t(-1));
   }
 #undef CHECK_ACCESS
 }
index b677774..fa105a7 100644 (file)
@@ -33,8 +33,8 @@ static void signatures() {
   {
     const fs::directory_entry e = {};
     std::error_code ec;
-    static_assert(std::is_same<decltype(e.file_size()), uintmax_t>::value, "");
-    static_assert(std::is_same<decltype(e.file_size(ec)), uintmax_t>::value,
+    static_assert(std::is_same<decltype(e.file_size()), std::uintmax_t>::value, "");
+    static_assert(std::is_same<decltype(e.file_size(ec)), std::uintmax_t>::value,
                   "");
     static_assert(noexcept(e.file_size()) == false, "");
     static_assert(noexcept(e.file_size(ec)) == true, "");
@@ -51,7 +51,7 @@ static void basic() {
 
   {
     directory_entry ent(file);
-    uintmax_t expect = file_size(ent);
+    std::uintmax_t expect = file_size(ent);
     assert(expect == 42);
 
     // Remove the file to show that the results were already in the cache.
@@ -65,7 +65,7 @@ static void basic() {
   {
     directory_entry ent(sym);
 
-    uintmax_t expect = file_size(ent);
+    std::uintmax_t expect = file_size(ent);
     assert(expect == 99);
 
     LIBCPP_ONLY(remove(ent));
@@ -97,11 +97,11 @@ static void not_regular_file() {
     std::error_code ec = GetTestEC(0);
 
     std::error_code other_ec = GetTestEC(1);
-    uintmax_t expect = file_size(p, other_ec);
+    std::uintmax_t expect = file_size(p, other_ec);
 
-    uintmax_t got = ent.file_size(ec);
+    std::uintmax_t got = ent.file_size(ec);
     assert(got == expect);
-    assert(got == uintmax_t(-1));
+    assert(got == std::uintmax_t(-1));
     assert(ec == other_ec);
     assert(ErrorIs(ec, TC.expected_err));
 
@@ -136,7 +136,7 @@ static void error_reporting() {
     assert(ErrorIs(ec, std::errc::no_such_file_or_directory));
 
     ec = GetTestEC();
-    assert(ent.file_size(ec) == uintmax_t(-1));
+    assert(ent.file_size(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::no_such_file_or_directory));
 
     ExceptionChecker Checker(static_env.DNE,
@@ -149,8 +149,8 @@ static void error_reporting() {
     directory_entry ent;
 
     std::error_code ec = GetTestEC();
-    uintmax_t expect_bad = file_size(static_env.BadSymlink, ec);
-    assert(expect_bad == uintmax_t(-1));
+    std::uintmax_t expect_bad = file_size(static_env.BadSymlink, ec);
+    assert(expect_bad == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::no_such_file_or_directory));
 
     ec = GetTestEC();
@@ -173,7 +173,7 @@ static void error_reporting() {
   // test a file w/o appropriate permissions.
   {
     directory_entry ent;
-    uintmax_t expect_good = file_size(file);
+    std::uintmax_t expect_good = file_size(file);
     permissions(dir, perms::none);
 
     std::error_code ec = GetTestEC();
@@ -182,7 +182,7 @@ static void error_reporting() {
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ec = GetTestEC();
-    assert(ent.file_size(ec) == uintmax_t(-1));
+    assert(ent.file_size(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ExceptionChecker Checker(file, std::errc::permission_denied, "file_size");
@@ -198,7 +198,7 @@ static void error_reporting() {
   // test a symlink w/o appropriate permissions.
   {
     directory_entry ent;
-    uintmax_t expect_good = file_size(sym_in_dir);
+    std::uintmax_t expect_good = file_size(sym_in_dir);
     permissions(dir, perms::none);
 
     std::error_code ec = GetTestEC();
@@ -207,7 +207,7 @@ static void error_reporting() {
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ec = GetTestEC();
-    assert(ent.file_size(ec) == uintmax_t(-1));
+    assert(ent.file_size(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ExceptionChecker Checker(sym_in_dir, std::errc::permission_denied,
@@ -224,7 +224,7 @@ static void error_reporting() {
   // test a symlink to a file w/o appropriate permissions
   {
     directory_entry ent;
-    uintmax_t expect_good = file_size(sym_out_of_dir);
+    std::uintmax_t expect_good = file_size(sym_out_of_dir);
     permissions(dir, perms::none);
 
     std::error_code ec = GetTestEC();
@@ -233,7 +233,7 @@ static void error_reporting() {
     assert(!ec);
 
     ec = GetTestEC();
-    assert(ent.file_size(ec) == uintmax_t(-1));
+    assert(ent.file_size(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ExceptionChecker Checker(sym_out_of_dir, std::errc::permission_denied,
index 3089cde..e8c4742 100644 (file)
@@ -33,8 +33,8 @@ static void signatures() {
   {
     const directory_entry e = {};
     std::error_code ec;
-    static_assert(std::is_same<decltype(e.hard_link_count()), uintmax_t>::value, "");
-    static_assert(std::is_same<decltype(e.hard_link_count(ec)), uintmax_t>::value,
+    static_assert(std::is_same<decltype(e.hard_link_count()), std::uintmax_t>::value, "");
+    static_assert(std::is_same<decltype(e.hard_link_count(ec)), std::uintmax_t>::value,
                   "");
     static_assert(noexcept(e.hard_link_count()) == false, "");
     static_assert(noexcept(e.hard_link_count(ec)) == true, "");
@@ -51,7 +51,7 @@ static void basic() {
 
   {
     directory_entry ent(file);
-    uintmax_t expect = hard_link_count(ent);
+    std::uintmax_t expect = hard_link_count(ent);
 
     // Remove the file to show that the results were already in the cache.
     LIBCPP_ONLY(remove(file));
@@ -62,7 +62,7 @@ static void basic() {
   }
   {
     directory_entry ent(dir);
-    uintmax_t expect = hard_link_count(ent);
+    std::uintmax_t expect = hard_link_count(ent);
 
     LIBCPP_ONLY(remove(dir));
 
@@ -94,7 +94,7 @@ static void not_regular_file() {
     directory_entry ent(p, dummy_ec);
     assert(!dummy_ec);
 
-    uintmax_t expect = hard_link_count(p);
+    std::uintmax_t expect = hard_link_count(p);
 
     LIBCPP_ONLY(permissions(dir, perms::none));
 
@@ -140,7 +140,7 @@ static void error_reporting() {
     assert(ErrorIs(ec, std::errc::no_such_file_or_directory));
 
     ec = GetTestEC();
-    assert(ent.hard_link_count(ec) == uintmax_t(-1));
+    assert(ent.hard_link_count(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::no_such_file_or_directory));
 
     ExceptionChecker Checker(static_env.DNE,
@@ -153,8 +153,8 @@ static void error_reporting() {
     directory_entry ent;
 
     std::error_code ec = GetTestEC();
-    uintmax_t expect_bad = hard_link_count(static_env.BadSymlink, ec);
-    assert(expect_bad == uintmax_t(-1));
+    std::uintmax_t expect_bad = hard_link_count(static_env.BadSymlink, ec);
+    assert(expect_bad == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::no_such_file_or_directory));
 
     ec = GetTestEC();
@@ -177,7 +177,7 @@ static void error_reporting() {
   // test a file w/o appropriate permissions.
   {
     directory_entry ent;
-    uintmax_t expect_good = hard_link_count(file);
+    std::uintmax_t expect_good = hard_link_count(file);
     permissions(dir, perms::none);
 
     std::error_code ec = GetTestEC();
@@ -186,7 +186,7 @@ static void error_reporting() {
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ec = GetTestEC();
-    assert(ent.hard_link_count(ec) == uintmax_t(-1));
+    assert(ent.hard_link_count(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ExceptionChecker Checker(file, std::errc::permission_denied,
@@ -203,7 +203,7 @@ static void error_reporting() {
   // test a symlink w/o appropriate permissions.
   {
     directory_entry ent;
-    uintmax_t expect_good = hard_link_count(sym_in_dir);
+    std::uintmax_t expect_good = hard_link_count(sym_in_dir);
     permissions(dir, perms::none);
 
     std::error_code ec = GetTestEC();
@@ -212,7 +212,7 @@ static void error_reporting() {
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ec = GetTestEC();
-    assert(ent.hard_link_count(ec) == uintmax_t(-1));
+    assert(ent.hard_link_count(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ExceptionChecker Checker(sym_in_dir, std::errc::permission_denied,
@@ -229,7 +229,7 @@ static void error_reporting() {
   // test a symlink to a file w/o appropriate permissions
   {
     directory_entry ent;
-    uintmax_t expect_good = hard_link_count(sym_out_of_dir);
+    std::uintmax_t expect_good = hard_link_count(sym_out_of_dir);
     permissions(dir, perms::none);
 
     std::error_code ec = GetTestEC();
@@ -238,7 +238,7 @@ static void error_reporting() {
     assert(!ec);
 
     ec = GetTestEC();
-    assert(ent.hard_link_count(ec) == uintmax_t(-1));
+    assert(ent.hard_link_count(ec) == std::uintmax_t(-1));
     assert(ErrorIs(ec, std::errc::permission_denied));
 
     ExceptionChecker Checker(sym_out_of_dir, std::errc::permission_denied,
index 37d1108..31d43eb 100644 (file)
@@ -33,9 +33,9 @@ using namespace fs;
 // be acceptable on all systems.
 static void large_file() {
   using namespace fs;
-  constexpr uintmax_t sendfile_size_limit = 2147479552ull;
-  constexpr uintmax_t additional_size = 1024;
-  constexpr uintmax_t test_file_size = sendfile_size_limit + additional_size;
+  constexpr std::uintmax_t sendfile_size_limit = 2147479552ull;
+  constexpr std::uintmax_t additional_size = 1024;
+  constexpr std::uintmax_t test_file_size = sendfile_size_limit + additional_size;
   static_assert(test_file_size > sendfile_size_limit, "");
 
   scoped_test_env env;
index 3fd484b..8e532fd 100644 (file)
@@ -31,8 +31,8 @@ static void signature_test()
 {
     const path p; ((void)p);
     std::error_code ec; ((void)ec);
-    ASSERT_SAME_TYPE(decltype(file_size(p)), uintmax_t);
-    ASSERT_SAME_TYPE(decltype(file_size(p, ec)), uintmax_t);
+    ASSERT_SAME_TYPE(decltype(file_size(p)), std::uintmax_t);
+    ASSERT_SAME_TYPE(decltype(file_size(p, ec)), std::uintmax_t);
     ASSERT_NOT_NOEXCEPT(file_size(p));
     ASSERT_NOEXCEPT(file_size(p, ec));
 }
@@ -75,7 +75,7 @@ static void file_size_error_cases()
       {static_env.BadSymlink, std::errc::no_such_file_or_directory},
       {static_env.DNE, std::errc::no_such_file_or_directory},
       {"", std::errc::no_such_file_or_directory}};
-    const uintmax_t expect = static_cast<uintmax_t>(-1);
+    const std::uintmax_t expect = static_cast<std::uintmax_t>(-1);
     for (auto& TC : TestCases) {
       std::error_code ec = GetTestEC();
       assert(file_size(TC.p, ec) == expect);
index bc37e0c..b646b46 100644 (file)
@@ -26,8 +26,8 @@ static void signature_test()
 {
     const path p; ((void)p);
     std::error_code ec; ((void)ec);
-    ASSERT_SAME_TYPE(decltype(hard_link_count(p)), uintmax_t);
-    ASSERT_SAME_TYPE(decltype(hard_link_count(p, ec)), uintmax_t);
+    ASSERT_SAME_TYPE(decltype(hard_link_count(p)), std::uintmax_t);
+    ASSERT_SAME_TYPE(decltype(hard_link_count(p, ec)), std::uintmax_t);
     ASSERT_NOT_NOEXCEPT(hard_link_count(p));
     ASSERT_NOEXCEPT(hard_link_count(p, ec));
 }
@@ -43,10 +43,10 @@ static void hard_link_count_for_file()
 static void hard_link_count_for_directory()
 {
     static_test_env static_env;
-    uintmax_t DirExpect = 3; // hard link from . .. and Dir2
-    uintmax_t Dir3Expect = 2; // hard link from . ..
-    uintmax_t DirExpectAlt = DirExpect;
-    uintmax_t Dir3ExpectAlt = Dir3Expect;
+    std::uintmax_t DirExpect = 3; // hard link from . .. and Dir2
+    std::uintmax_t Dir3Expect = 2; // hard link from . ..
+    std::uintmax_t DirExpectAlt = DirExpect;
+    std::uintmax_t Dir3ExpectAlt = Dir3Expect;
 #if defined(__APPLE__)
     // Filesystems formatted with case sensitive hfs+ behave unixish as
     // expected. Normal hfs+ filesystems report the number of directory
@@ -88,7 +88,7 @@ static void hard_link_count_error_cases()
         static_env.BadSymlink,
         static_env.DNE
     };
-    const uintmax_t expect = static_cast<uintmax_t>(-1);
+    const std::uintmax_t expect = static_cast<std::uintmax_t>(-1);
     for (auto& TC : testCases) {
         std::error_code ec;
         assert(hard_link_count(TC, ec) == expect);
index 89e2b6b..71902b7 100644 (file)
@@ -44,7 +44,7 @@ int main(int, char**)
     static_assert(toobig<std::uint32_t>(), "");  // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
     static_assert(toobig<std::uint64_t>(), "");  // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
     static_assert(toobig<std::size_t>(), "");    // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
-    static_assert(toobig<uintmax_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+    static_assert(toobig<std::uintmax_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
     static_assert(toobig<std::uintptr_t>(), ""); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
 
     return 0;
index a4d70dc..4e794f1 100644 (file)
@@ -88,7 +88,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -119,7 +119,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -135,7 +135,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index 0af4cdd..06ee38c 100644 (file)
@@ -85,7 +85,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -117,7 +117,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -134,7 +134,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index 747b4e0..cfb9a16 100644 (file)
@@ -90,7 +90,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -121,7 +121,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -137,7 +137,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index 398fee8..7b23627 100644 (file)
@@ -88,7 +88,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -119,7 +119,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -135,7 +135,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index 7b8f6da..bbce57b 100644 (file)
@@ -85,7 +85,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -116,7 +116,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -132,7 +132,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index 4b0f815..f103450 100644 (file)
@@ -84,7 +84,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -115,7 +115,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -131,7 +131,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index b88a770..8e8ef1d 100644 (file)
@@ -89,7 +89,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -120,7 +120,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -136,7 +136,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index 2f2f81d..d0fdf92 100644 (file)
@@ -86,7 +86,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -117,7 +117,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -133,7 +133,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index 605b84e..b8759c4 100644 (file)
@@ -96,7 +96,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -127,7 +127,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -143,7 +143,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index 2b56ae1..9592db6 100644 (file)
@@ -84,7 +84,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -116,7 +116,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -133,7 +133,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index fee122f..9575254 100644 (file)
@@ -85,7 +85,7 @@ int main(int, char**)
     static_assert(!std::is_invocable_v<L, std::int16_t>);
     static_assert(!std::is_invocable_v<L, std::int32_t>);
     static_assert(!std::is_invocable_v<L, std::int64_t>);
-    static_assert(!std::is_invocable_v<L, intmax_t>);
+    static_assert(!std::is_invocable_v<L, std::intmax_t>);
     static_assert(!std::is_invocable_v<L, std::intptr_t>);
     static_assert(!std::is_invocable_v<L, std::ptrdiff_t>);
 
@@ -117,7 +117,7 @@ int main(int, char**)
     static_assert(test<std::uint16_t>());
     static_assert(test<std::uint32_t>());
     static_assert(test<std::uint64_t>());
-    static_assert(test<uintmax_t>());
+    static_assert(test<std::uintmax_t>());
     static_assert(test<std::uintptr_t>());
     static_assert(test<std::size_t>());
 
@@ -134,7 +134,7 @@ int main(int, char**)
     test<std::uint16_t>();
     test<std::uint32_t>();
     test<std::uint64_t>();
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
     test<std::size_t>();
 
index fb5fe15..c9937e7 100644 (file)
@@ -73,56 +73,56 @@ static void test() {
   // std::chrono::hh_mm_ss.
 
   // C locale - integral power of 10 ratios
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::femto>{1'234'567'890}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::femto>{1'234'567'890}}) ==
          SV("00:00:00.000001234567890"));
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::pico>{1'234'567'890}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::pico>{1'234'567'890}}) ==
          SV("00:00:00.001234567890"));
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::nano>{1'234'567'890}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::nano>{1'234'567'890}}) ==
          SV("00:00:01.234567890"));
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::micro>{1'234'567}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::micro>{1'234'567}}) ==
          SV("00:00:01.234567"));
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::milli>{123'456}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::milli>{123'456}}) ==
          SV("00:02:03.456"));
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::centi>{12'345}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::centi>{12'345}}) ==
          SV("00:02:03.45"));
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::deci>{1'234}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::deci>{1'234}}) ==
          SV("00:02:03.4"));
 
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t>{123}}) == SV("00:02:03"));
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t>{123}}) == SV("00:02:03"));
 
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::deca>{-366}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::deca>{-366}}) ==
          SV("-01:01:00"));
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::hecto>{-72}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::hecto>{-72}}) ==
          SV("-02:00:00"));
-  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::kilo>{-86}}) ==
+  assert(stream_c_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::kilo>{-86}}) ==
          SV("-23:53:20"));
 
   // Starting at mega it will pass one day
 
   // fr_FR locale - integral power of not 10 ratios
   assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{
-             std::chrono::duration<intmax_t, std::ratio<1, 5'000'000>>{5'000}}) == SV("00:00:00,0010000"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 8'000>>{3}}) ==
+             std::chrono::duration<std::intmax_t, std::ratio<1, 5'000'000>>{5'000}}) == SV("00:00:00,0010000"));
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 8'000>>{3}}) ==
          SV("00:00:00,000375"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 4'000>>{1}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 4'000>>{1}}) ==
          SV("00:00:00,00025"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 5'000>>{5}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 5'000>>{5}}) ==
          SV("00:00:00,0010"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 8>>{-4}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 8>>{-4}}) ==
          SV("-00:00:00,500"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 4>>{-8}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 4>>{-8}}) ==
          SV("-00:00:02,00"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 5>>{-5}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 5>>{-5}}) ==
          SV("-00:00:01,0"));
 
   // TODO FMT Note there's no wording on the rounding
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 9>>{5}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 9>>{5}}) ==
          SV("00:00:00,555555"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 7>>{7}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 7>>{7}}) ==
          SV("00:00:01,000000"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 6>>{1}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 6>>{1}}) ==
          SV("00:00:00,166666"));
-  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<intmax_t, std::ratio<1, 3>>{2}}) ==
+  assert(stream_fr_FR_locale<CharT>(std::chrono::hh_mm_ss{std::chrono::duration<std::intmax_t, std::ratio<1, 3>>{2}}) ==
          SV("00:00:00,666666"));
 
   // ja_JP locale - floating points
index 124eb84..4d6bc17 100644 (file)
@@ -89,7 +89,7 @@ int main(int, char**)
     test<std::int_least32_t>();
     test<std::int_least64_t>();
 
-    test<intmax_t>();
+    test<std::intmax_t>();
     test<std::intptr_t>();
 
     test<std::uint8_t>();
@@ -107,7 +107,7 @@ int main(int, char**)
     test<std::uint_least32_t>();
     test<std::uint_least64_t>();
 
-    test<uintmax_t>();
+    test<std::uintmax_t>();
     test<std::uintptr_t>();
 
 #ifndef TEST_HAS_NO_INT128
index 5d3738b..8c2bbb0 100644 (file)
@@ -215,7 +215,7 @@ struct scoped_test_env
     // but the caller is not (std::filesystem also uses uintmax_t rather than
     // off_t). On a 32-bit system this allows us to create a file larger than
     // 2GB.
-    std::string create_file(fs::path filename_path, uintmax_t size = 0) {
+    std::string create_file(fs::path filename_path, std::uintmax_t size = 0) {
         std::string filename = sanitize_path(filename_path.string());
 
         if (size >