diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h index 836cb0a415f..a32654ad1b2 100644 --- a/AK/StdLibExtras.h +++ b/AK/StdLibExtras.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, Andreas Kling + * Copyright (c) 2018-2021, Andreas Kling * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -33,6 +33,20 @@ constexpr unsigned round_up_to_power_of_two(unsigned value, unsigned power_of_tw return ((value - 1) & ~(power_of_two - 1)) + power_of_two; } +namespace std { + +// NOTE: This is in the "std" namespace since some compiler features rely on it. + +template +constexpr T&& move(T& arg) +{ + return static_cast(arg); +} + +} + +using std::move; + namespace AK { template @@ -77,12 +91,6 @@ constexpr T ceil_div(T a, U b) return result; } -template -constexpr T&& move(T& arg) -{ - return static_cast(arg); -} - template inline void swap(T& a, U& b) { @@ -622,7 +630,6 @@ using AK::MakeSigned; using AK::MakeUnsigned; using AK::max; using AK::min; -using AK::move; using AK::RemoveConst; using AK::swap; using AK::UnderlyingType;