summaryrefslogtreecommitdiffstats
path: root/third_party/msgpack/include/msgpack/preprocessor/seq/detail/is_empty.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/msgpack/include/msgpack/preprocessor/seq/detail/is_empty.hpp')
-rw-r--r--third_party/msgpack/include/msgpack/preprocessor/seq/detail/is_empty.hpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/third_party/msgpack/include/msgpack/preprocessor/seq/detail/is_empty.hpp b/third_party/msgpack/include/msgpack/preprocessor/seq/detail/is_empty.hpp
new file mode 100644
index 0000000000..b897a04c5c
--- /dev/null
+++ b/third_party/msgpack/include/msgpack/preprocessor/seq/detail/is_empty.hpp
@@ -0,0 +1,49 @@
+# /* **************************************************************************
+# * *
+# * (C) Copyright Edward Diener 2015.
+# * Distributed under the Boost Software License, Version 1.0. (See
+# * accompanying file LICENSE_1_0.txt or copy at
+# * http://www.boost.org/LICENSE_1_0.txt)
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef MSGPACK_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP
+# define MSGPACK_PREPROCESSOR_SEQ_DETAIL_IS_EMPTY_HPP
+#
+# include <msgpack/preprocessor/config/config.hpp>
+# include <msgpack/preprocessor/arithmetic/dec.hpp>
+# include <msgpack/preprocessor/logical/bool.hpp>
+# include <msgpack/preprocessor/logical/compl.hpp>
+# include <msgpack/preprocessor/seq/size.hpp>
+#
+/* An empty seq is one that is just MSGPACK_PP_SEQ_NIL */
+#
+# define MSGPACK_PP_SEQ_DETAIL_IS_EMPTY(seq) \
+ MSGPACK_PP_COMPL \
+ ( \
+ MSGPACK_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \
+ ) \
+/**/
+#
+# define MSGPACK_PP_SEQ_DETAIL_IS_EMPTY_SIZE(size) \
+ MSGPACK_PP_COMPL \
+ ( \
+ MSGPACK_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \
+ ) \
+/**/
+#
+# define MSGPACK_PP_SEQ_DETAIL_IS_NOT_EMPTY(seq) \
+ MSGPACK_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(MSGPACK_PP_SEQ_DETAIL_EMPTY_SIZE(seq)) \
+/**/
+#
+# define MSGPACK_PP_SEQ_DETAIL_IS_NOT_EMPTY_SIZE(size) \
+ MSGPACK_PP_BOOL(size) \
+/**/
+#
+# define MSGPACK_PP_SEQ_DETAIL_EMPTY_SIZE(seq) \
+ MSGPACK_PP_DEC(MSGPACK_PP_SEQ_SIZE(seq (nil))) \
+/**/
+#
+# endif