2
0
mirror of https://github.com/boostorg/wave.git synced 2026-01-19 04:42:16 +00:00
Files
wave/test/testwave/testfiles/t_3_003.cpp
Jeff Trull 3b6df8adb1 Include __LINE__, __FILE__, __INCLUDE_LEVEL__, and __VA_OPT__ in hooks (#87)
* Run hooks for certain predefined object-like macros

These are the "dynamic" macros with their own special execution path.
Most predefined macros can be computed at startup time; those were
already covered by the normal expansion code.

*  __VA_OPT__ is supported as a function-like macro

It is referred to as such in the proposal. __VA_ARGS__ is not supported, under the theory that it represents a parameter or set of parameters, and no hooks are called for parameter substitutions.
2020-04-12 12:40:03 -07:00

77 lines
2.0 KiB
C++

/*=============================================================================
Boost.Wave: A Standard compliant C++ preprocessor library
http://www.boost.org/
Copyright (c) 2001-2012 Hartmut Kaiser. 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)
=============================================================================*/
//O --variadics
// Tests predefined macros
//R #line 15 "t_3_003.cpp"
__STDC__ //R 1
__STDC_VERSION__ //R __STDC_VERSION__
__cplusplus //R 199711L
__STDC_HOSTED__ //R __STDC_HOSTED__
__LINE__ //R 19
__FILE__ //R "$P"
__BASE_FILE__ //R "$F"
__WAVE_HAS_VARIADICS__ //R 1
__INCLUDE_LEVEL__ //R 0
//R #line 50 "test.cpp"
#line 50 "test.cpp"
__LINE__ //R 50
__FILE__ //R "test.cpp"
__BASE_FILE__ //R "$F"
//R #line 56 "test.cpp"
__LINE__ //R 56
__FILE__ //R "test.cpp"
__BASE_FILE__ //R "$F"
//H 01: <built-in>(1): __STDC__
//H 02: 1
//H 03: 1
//H 01: <built-in>(1): __cplusplus
//H 02: 199711L
//H 03: 199711L
//H 01: <built-in>(1): __LINE__
//H 02: 19
//H 03: 19
//H 01: <built-in>(1): __FILE__
//H 02: "$P(t_3_003.cpp)"
//H 03: "$P(t_3_003.cpp)"
//H 01: <built-in>(1): __BASE_FILE__
//H 02: "$F"
//H 03: "$F"
//H 01: <built-in>(1): __WAVE_HAS_VARIADICS__
//H 02: 1
//H 03: 1
//H 01: <built-in>(1): __INCLUDE_LEVEL__
//H 02: 0
//H 03: 0
//H 10: t_3_003.cpp(25): #line
//H 17: 50 "test.cpp" (50, "test.cpp")
//H 01: <built-in>(1): __LINE__
//H 02: 50
//H 03: 50
//H 01: <built-in>(1): __FILE__
//H 02: "test.cpp"
//H 03: "test.cpp"
//H 01: <built-in>(1): __BASE_FILE__
//H 02: "$F"
//H 03: "$F"
//H 01: <built-in>(1): __LINE__
//H 02: 56
//H 03: 56
//H 01: <built-in>(1): __FILE__
//H 02: "test.cpp"
//H 03: "test.cpp"
//H 01: <built-in>(1): __BASE_FILE__
//H 02: "$F"
//H 03: "$F"