summaryrefslogtreecommitdiff
path: root/AK/StdLibExtras.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-01-19 10:28:58 +0100
committerAndreas Kling <kling@serenityos.org>2020-01-19 10:33:26 +0100
commit604c5cb98e8be38126f48bfd0b821772553be005 (patch)
treec23500a1948fe80d87ce33f74cb4860e258ecaf1 /AK/StdLibExtras.h
parent87583aea9c21423a5c1de4d02c7461bbaffb1d63 (diff)
downloadserenity-604c5cb98e8be38126f48bfd0b821772553be005.zip
AK: Add some missing "inline" keywords in StdLibExtras.h
Diffstat (limited to 'AK/StdLibExtras.h')
-rw-r--r--AK/StdLibExtras.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/AK/StdLibExtras.h b/AK/StdLibExtras.h
index b65ee96bdc..565ef2ace7 100644
--- a/AK/StdLibExtras.h
+++ b/AK/StdLibExtras.h
@@ -99,7 +99,7 @@ inline constexpr T ceil_div(T a, U b)
# pragma clang diagnostic ignored "-Wconsumed"
#endif
template<typename T>
-T&& move(T& arg)
+inline T&& move(T& arg)
{
return static_cast<T&&>(arg);
}
@@ -113,13 +113,13 @@ struct Identity {
};
template<class T>
-constexpr T&& forward(typename Identity<T>::Type& param)
+inline constexpr T&& forward(typename Identity<T>::Type& param)
{
return static_cast<T&&>(param);
}
template<typename T, typename U>
-T exchange(T& a, U&& b)
+inline T exchange(T& a, U&& b)
{
T tmp = move(a);
a = move(b);
@@ -127,7 +127,7 @@ T exchange(T& a, U&& b)
}
template<typename T, typename U>
-void swap(T& a, U& b)
+inline void swap(T& a, U& b)
{
U tmp = move((U&)a);
a = (T &&) move(b);