From e8ccb6aebd41df61b2c5fed701a5d6609d123b9a Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Thu, 11 Apr 2024 23:25:46 +0800 Subject: [PATCH] feat use discard --- src/sled/lang/attributes.h | 4 +++- src/sled/strings/base64.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sled/lang/attributes.h b/src/sled/lang/attributes.h index 638959b..259997e 100644 --- a/src/sled/lang/attributes.h +++ b/src/sled/lang/attributes.h @@ -2,7 +2,9 @@ #define SLED_LANG_ATTRIBUTES_H #pragma once -#define SLED_DEPRECATED __attribute__((deprecated)) +// #define SLED_DEPRECATED __attribute__((deprecated)) +#define SLED_NODISCARD [[nodiscard]] +#define SLED_DEPRECATED [[deprecated]] #if defined(__clang__) && (!defined(SWIG)) #define SLED_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) diff --git a/src/sled/strings/base64.h b/src/sled/strings/base64.h index 4ce916f..3f90d25 100644 --- a/src/sled/strings/base64.h +++ b/src/sled/strings/base64.h @@ -8,6 +8,7 @@ #ifndef SLED_STRINGS_BASE64_H #define SLED_STRINGS_BASE64_H +#include "sled/nonstd/string_view.h" #include "sled/status_or.h" #include #include