整理
This commit is contained in:
21
include/boost/preprocessor/punctuation/comma.hpp
Normal file
21
include/boost/preprocessor/punctuation/comma.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
# /* Copyright (C) 2001
|
||||
# * Housemarque Oy
|
||||
# * http://www.housemarque.com
|
||||
# *
|
||||
# * 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)
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP
|
||||
# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_HPP
|
||||
#
|
||||
# /* BOOST_PP_COMMA */
|
||||
#
|
||||
# define BOOST_PP_COMMA() ,
|
||||
#
|
||||
# endif
|
||||
31
include/boost/preprocessor/punctuation/comma_if.hpp
Normal file
31
include/boost/preprocessor/punctuation/comma_if.hpp
Normal file
@@ -0,0 +1,31 @@
|
||||
# /* Copyright (C) 2001
|
||||
# * Housemarque Oy
|
||||
# * http://www.housemarque.com
|
||||
# *
|
||||
# * 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)
|
||||
# */
|
||||
#
|
||||
# /* Revised by Paul Mensonides (2002) */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP
|
||||
# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/punctuation/comma.hpp>
|
||||
#
|
||||
# /* BOOST_PP_COMMA_IF */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)()
|
||||
# else
|
||||
# define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond)
|
||||
# define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)()
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,48 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP
|
||||
#define BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC
|
||||
|
||||
#include <boost/preprocessor/facilities/empty.hpp>
|
||||
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b)
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT_I(a, b) BOOST_PP_DETAIL_VD_IBP_CAT_II(a ## b)
|
||||
#define BOOST_PP_DETAIL_VD_IBP_CAT_II(res) res
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \
|
||||
BOOST_PP_DETAIL_VD_IBP_CAT(BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__),BOOST_PP_EMPTY()) \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1 1
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT(i, ...) \
|
||||
BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(BOOST_PP_DETAIL_IBP_SPLIT_,i)(__VA_ARGS__) \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_C(...) 1
|
||||
|
||||
#endif /* BOOST_PP_VARIADICS_MSVC */
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT_0(a, ...) a
|
||||
#define BOOST_PP_DETAIL_IBP_SPLIT_1(a, ...) __VA_ARGS__
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_CAT(a, ...) BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a,__VA_ARGS__)
|
||||
#define BOOST_PP_DETAIL_IBP_PRIMITIVE_CAT(a, ...) a ## __VA_ARGS__
|
||||
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_1 1,
|
||||
#define BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_BOOST_PP_DETAIL_IBP_IS_VARIADIC_C 0,
|
||||
|
||||
#endif /* BOOST_PREPROCESSOR_DETAIL_IS_BEGIN_PARENS_HPP */
|
||||
47
include/boost/preprocessor/punctuation/is_begin_parens.hpp
Normal file
47
include/boost/preprocessor/punctuation/is_begin_parens.hpp
Normal file
@@ -0,0 +1,47 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP
|
||||
# define BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP
|
||||
|
||||
#include <boost/preprocessor/config/config.hpp>
|
||||
#include <boost/preprocessor/punctuation/detail/is_begin_parens.hpp>
|
||||
|
||||
#if BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400
|
||||
|
||||
#define BOOST_PP_IS_BEGIN_PARENS(param) \
|
||||
BOOST_PP_DETAIL_IBP_SPLIT \
|
||||
( \
|
||||
0, \
|
||||
BOOST_PP_DETAIL_IBP_CAT \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_C param \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_PP_IS_BEGIN_PARENS(...) \
|
||||
BOOST_PP_DETAIL_IBP_SPLIT \
|
||||
( \
|
||||
0, \
|
||||
BOOST_PP_DETAIL_IBP_CAT \
|
||||
( \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_R_, \
|
||||
BOOST_PP_DETAIL_IBP_IS_VARIADIC_C __VA_ARGS__ \
|
||||
) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
#endif /* BOOST_PP_VARIADICS_MSVC && _MSC_VER <= 1400 */
|
||||
#endif /* BOOST_PREPROCESSOR_IS_BEGIN_PARENS_HPP */
|
||||
23
include/boost/preprocessor/punctuation/paren.hpp
Normal file
23
include/boost/preprocessor/punctuation/paren.hpp
Normal file
@@ -0,0 +1,23 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP
|
||||
# define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_HPP
|
||||
#
|
||||
# /* BOOST_PP_LPAREN */
|
||||
#
|
||||
# define BOOST_PP_LPAREN() (
|
||||
#
|
||||
# /* BOOST_PP_RPAREN */
|
||||
#
|
||||
# define BOOST_PP_RPAREN() )
|
||||
#
|
||||
# endif
|
||||
38
include/boost/preprocessor/punctuation/paren_if.hpp
Normal file
38
include/boost/preprocessor/punctuation/paren_if.hpp
Normal file
@@ -0,0 +1,38 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * 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 BOOST_PREPROCESSOR_PUNCTUATION_PAREN_IF_HPP
|
||||
# define BOOST_PREPROCESSOR_PUNCTUATION_PAREN_IF_HPP
|
||||
#
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/if.hpp>
|
||||
# include <boost/preprocessor/facilities/empty.hpp>
|
||||
# include <boost/preprocessor/punctuation/paren.hpp>
|
||||
#
|
||||
# /* BOOST_PP_LPAREN_IF */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_LPAREN_IF(cond) BOOST_PP_IF(cond, BOOST_PP_LPAREN, BOOST_PP_EMPTY)()
|
||||
# else
|
||||
# define BOOST_PP_LPAREN_IF(cond) BOOST_PP_LPAREN_IF_I(cond)
|
||||
# define BOOST_PP_LPAREN_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_LPAREN, BOOST_PP_EMPTY)()
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_RPAREN_IF */
|
||||
#
|
||||
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG()
|
||||
# define BOOST_PP_RPAREN_IF(cond) BOOST_PP_IF(cond, BOOST_PP_RPAREN, BOOST_PP_EMPTY)()
|
||||
# else
|
||||
# define BOOST_PP_RPAREN_IF(cond) BOOST_PP_RPAREN_IF_I(cond)
|
||||
# define BOOST_PP_RPAREN_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_RPAREN, BOOST_PP_EMPTY)()
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
35
include/boost/preprocessor/punctuation/remove_parens.hpp
Normal file
35
include/boost/preprocessor/punctuation/remove_parens.hpp
Normal file
@@ -0,0 +1,35 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Edward Diener 2014.
|
||||
# * 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 BOOST_PREPROCESSOR_REMOVE_PARENS_HPP
|
||||
#define BOOST_PREPROCESSOR_REMOVE_PARENS_HPP
|
||||
|
||||
#include <boost/preprocessor/config/config.hpp>
|
||||
#include <boost/preprocessor/control/iif.hpp>
|
||||
#include <boost/preprocessor/facilities/identity.hpp>
|
||||
#include <boost/preprocessor/punctuation/is_begin_parens.hpp>
|
||||
#include <boost/preprocessor/tuple/enum.hpp>
|
||||
|
||||
#define BOOST_PP_REMOVE_PARENS(param) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_IS_BEGIN_PARENS(param), \
|
||||
BOOST_PP_REMOVE_PARENS_DO, \
|
||||
BOOST_PP_IDENTITY \
|
||||
) \
|
||||
(param)() \
|
||||
/**/
|
||||
|
||||
#define BOOST_PP_REMOVE_PARENS_DO(param) \
|
||||
BOOST_PP_IDENTITY(BOOST_PP_TUPLE_ENUM(param)) \
|
||||
/**/
|
||||
|
||||
#endif /* BOOST_PREPROCESSOR_REMOVE_PARENS_HPP */
|
||||
Reference in New Issue
Block a user