From cbade33906dc0d090d5dba6231fb48e359afff95 Mon Sep 17 00:00:00 2001
From: Steven Le Rouzic <steven.lerouzic@gmail.com>
Date: Wed, 12 Mar 2025 00:37:23 +0100
Subject: Some more shit

---
 asl/base/config.hpp  | 5 +++++
 asl/base/defer.hpp   | 4 +++-
 asl/base/utility.hpp | 9 ++++-----
 3 files changed, 12 insertions(+), 6 deletions(-)

(limited to 'asl/base')

diff --git a/asl/base/config.hpp b/asl/base/config.hpp
index a8652c5..f5756c3 100644
--- a/asl/base/config.hpp
+++ b/asl/base/config.hpp
@@ -2,6 +2,8 @@
 //
 // SPDX-License-Identifier: BSD-3-Clause
 
+// NOLINTBEGIN(*-macro-to-enum)
+
 #pragma once
 
 #if defined(_WIN32)
@@ -19,3 +21,6 @@
 #else
     #error Unknown compiler
 #endif
+
+// NOLINTEND(*-macro-to-enum)
+
diff --git a/asl/base/defer.hpp b/asl/base/defer.hpp
index c9c08ba..a932758 100644
--- a/asl/base/defer.hpp
+++ b/asl/base/defer.hpp
@@ -18,7 +18,9 @@ class DeferCallback
 
 public:
     template<typename T>
-    explicit DeferCallback(T&& callback) : m_callback(std::forward<T>(callback))
+    explicit DeferCallback(T&& callback)
+        requires (!same_as<un_cvref_t<T>, DeferCallback>)
+        : m_callback(std::forward<T>(callback))
     {
     }
 
diff --git a/asl/base/utility.hpp b/asl/base/utility.hpp
index 07f8b51..206a5b1 100644
--- a/asl/base/utility.hpp
+++ b/asl/base/utility.hpp
@@ -11,25 +11,25 @@ namespace std
 {
 
 template<typename T>
-constexpr asl::un_ref_t<T>&& move(T&& t) noexcept // NOLINT
+[[nodiscard]] constexpr asl::un_ref_t<T>&& move(T&& t) noexcept // NOLINT
 {
     return static_cast<asl::un_ref_t<T>&&>(t);
 }
 
 template<typename T>
-constexpr T&& forward(asl::un_ref_t<T>& t) noexcept // NOLINT
+[[nodiscard]] constexpr T&& forward(asl::un_ref_t<T>& t) noexcept // NOLINT
 {
     return static_cast<T&&>(t);
 }
 
 template< class T >
-constexpr T&& forward(asl::un_ref_t<T>&& t) noexcept // NOLINT
+[[nodiscard]] constexpr T&& forward(asl::un_ref_t<T>&& t) noexcept // NOLINT
 {
     return static_cast<T&&>(t);
 }
 
 template<typename T, typename U>
-constexpr auto forward_like(U&& x) noexcept -> asl::copy_cref_t<T, U> // NOLINT
+[[nodiscard]] constexpr auto forward_like(U&& x) noexcept -> asl::copy_cref_t<T, U> // NOLINT
 {
     using return_type = asl::copy_cref_t<T, U&&>;
     return static_cast<return_type>(x);
@@ -37,7 +37,6 @@ constexpr auto forward_like(U&& x) noexcept -> asl::copy_cref_t<T, U> // NOLINT
 
 } // namespace std
 
-
 namespace asl
 {
 
-- 
cgit