[beast: 53/57] SFI: cxxaux: add BSE_CPP_PASTE2()
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 53/57] SFI: cxxaux: add BSE_CPP_PASTE2()
- Date: Sun, 23 Jul 2017 10:02:14 +0000 (UTC)
commit 9476c9b11b900bff96f5bee8a164e3cc6a4591ac
Author: Tim Janik <timj gnu org>
Date: Wed Jul 19 03:11:08 2017 +0200
SFI: cxxaux: add BSE_CPP_PASTE2()
Signed-off-by: Tim Janik <timj gnu org>
sfi/cxxaux.hh | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/sfi/cxxaux.hh b/sfi/cxxaux.hh
index de25dc1..dab0516 100644
--- a/sfi/cxxaux.hh
+++ b/sfi/cxxaux.hh
@@ -40,6 +40,8 @@ typedef vector<String> StringVector; ///< Convenience alias for a std::vector
// == Utility Macros ==
#define BSE_CPP_STRINGIFY(s) BSE_CPP_STRINGIFY_ (s) ///< Convert macro argument into a C
const char*.
#define BSE_CPP_STRINGIFY_(s) #s // Indirection helper, required to
expand macros like __LINE__
+#define BSE_CPP_PASTE2_(a,b) a ## b // Indirection helper, required to
expand macros like __LINE__
+#define BSE_CPP_PASTE2(a,b) BSE_CPP_PASTE2_ (a,b) ///< Paste two macro arguments into
one C symbol name
#define BSE_ISLIKELY(expr) __builtin_expect (bool (expr), 1) ///< Compiler hint to optimize for
@a expr evaluating to true.
#define BSE_UNLIKELY(expr) __builtin_expect (bool (expr), 0) ///< Compiler hint to optimize for
@a expr evaluating to false.
#define BSE_ABS(a) ((a) < 0 ? -(a) : (a)) ///< Yield the absolute value of @a
a.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]