summaryrefslogtreecommitdiffstats
path: root/third_party/msgpack/include/msgpack/preprocessor/debug/line.hpp
blob: e712a0f080e80044a05bc02a7dd11269cdfc5034 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# /* **************************************************************************
#  *                                                                          *
#  *     (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 MSGPACK_PREPROCESSOR_DEBUG_LINE_HPP
# define MSGPACK_PREPROCESSOR_DEBUG_LINE_HPP
#
# include <msgpack/preprocessor/cat.hpp>
# include <msgpack/preprocessor/config/config.hpp>
# include <msgpack/preprocessor/iteration/iterate.hpp>
# include <msgpack/preprocessor/stringize.hpp>
#
# /* MSGPACK_PP_LINE */
#
# if MSGPACK_PP_CONFIG_EXTENDED_LINE_INFO
#    define MSGPACK_PP_LINE(line, file) line MSGPACK_PP_CAT(MSGPACK_PP_LINE_, MSGPACK_PP_IS_ITERATING)(file)
#    define MSGPACK_PP_LINE_MSGPACK_PP_IS_ITERATING(file) #file
#    define MSGPACK_PP_LINE_1(file) MSGPACK_PP_STRINGIZE(file MSGPACK_PP_CAT(MSGPACK_PP_LINE_I_, MSGPACK_PP_ITERATION_DEPTH())())
#    define MSGPACK_PP_LINE_I_1() [MSGPACK_PP_FRAME_ITERATION(1)]
#    define MSGPACK_PP_LINE_I_2() MSGPACK_PP_LINE_I_1()[MSGPACK_PP_FRAME_ITERATION(2)]
#    define MSGPACK_PP_LINE_I_3() MSGPACK_PP_LINE_I_2()[MSGPACK_PP_FRAME_ITERATION(3)]
#    define MSGPACK_PP_LINE_I_4() MSGPACK_PP_LINE_I_3()[MSGPACK_PP_FRAME_ITERATION(4)]
#    define MSGPACK_PP_LINE_I_5() MSGPACK_PP_LINE_I_4()[MSGPACK_PP_FRAME_ITERATION(5)]
# else
#    define MSGPACK_PP_LINE(line, file) line __FILE__
# endif
#
# endif