summaryrefslogtreecommitdiff
path: root/AK/Types.h
diff options
context:
space:
mode:
authorAli Mohammad Pur <ali.mpfard@gmail.com>2022-12-13 10:29:30 +0330
committerAndreas Kling <kling@serenityos.org>2022-12-14 11:44:32 +0100
commitf96a3c002aa994d5811a677bd93553ccf9a8abf1 (patch)
treec22c82871d944c345bc6bad1e21d57f37800d1f4 /AK/Types.h
parent72514d6915a685552a258d2e4c85d9d52184c1b6 (diff)
downloadserenity-f96a3c002aa994d5811a677bd93553ccf9a8abf1.zip
Everywhere: Stop shoving things into ::std and mentioning them as such
Note that this still keeps the old behaviour of putting things in std by default on serenity so the tools can be happy, but if USING_AK_GLOBALLY is unset, AK behaves like a good citizen and doesn't try to put things in the ::std namespace. std::nothrow_t and its friends get to stay because I'm being told that compilers assume things about them and I can't yeet them into a different namespace...for now.
Diffstat (limited to 'AK/Types.h')
-rw-r--r--AK/Types.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/AK/Types.h b/AK/Types.h
index 32a8607d1c..db6146b81a 100644
--- a/AK/Types.h
+++ b/AK/Types.h
@@ -81,13 +81,13 @@ constexpr u64 TiB = KiB * KiB * KiB * KiB;
constexpr u64 PiB = KiB * KiB * KiB * KiB * KiB;
constexpr u64 EiB = KiB * KiB * KiB * KiB * KiB * KiB;
-namespace std { // NOLINT(cert-dcl58-cpp) nullptr_t must be in ::std:: for some analysis tools
+namespace AK_REPLACED_STD_NAMESPACE { // NOLINT(cert-dcl58-cpp) nullptr_t must be in ::std:: for some analysis tools
using nullptr_t = decltype(nullptr);
}
namespace AK {
-using nullptr_t = std::nullptr_t;
+using nullptr_t = AK_REPLACED_STD_NAMESPACE::nullptr_t;
static constexpr FlatPtr explode_byte(u8 b)
{
@@ -133,6 +133,7 @@ enum MemoryOrder {
#if USING_AK_GLOBALLY
using AK::align_down_to;
using AK::align_up_to;
+using AK::explode_byte;
using AK::MemoryOrder;
using AK::nullptr_t;
using AK::TriState;