File: t_9_003.cpp

package info (click to toggle)
boost1.88 1.88.0-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 576,932 kB
  • sloc: cpp: 4,149,234; xml: 136,789; ansic: 35,092; python: 33,910; asm: 5,698; sh: 4,604; ada: 1,681; makefile: 1,633; pascal: 1,139; perl: 1,124; sql: 640; yacc: 478; ruby: 271; java: 77; lisp: 24; csh: 6
file content (61 lines) | stat: -rw-r--r-- 1,998 bytes parent folder | download | duplicates (14)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*=============================================================================
    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)
=============================================================================*/

// Test, if additional whitespace is inserted at appropriate places.

#define STRINGIZE(x) STRINGIZE_D(x)
#define STRINGIZE_D(x) #x

#define X() 1
#define PLUS() +
#define MINUS() -
#define DOT() .
#define GREATER() >
#define LESS() <

//R #line 23 "t_9_003.cpp"
X()2                          //R 1 2 
STRINGIZE( X()2 )             //R "12" 
//R 
X() 2                         //R 1 2 
STRINGIZE( X() 2 )            //R "1 2" 
//R 
PLUS()MINUS()                 //R +- 
STRINGIZE( PLUS()MINUS() )    //R "+-" 
//R 
PLUS()PLUS()                  //R + + 
STRINGIZE( PLUS()PLUS() )     //R "++" 
//R 
MINUS()MINUS()                //R - - 
STRINGIZE( MINUS()MINUS() )   //R "--" 
//R 
DOT()DOT()DOT()               //R .. . 
STRINGIZE( DOT()DOT()DOT() )  //R "..." 

// the following are regressions reported by Stefan Seefeld
//R #line 43 "t_9_003.cpp"
GREATER()GREATER()            //R > > 
STRINGIZE( GREATER()GREATER() ) //R ">>" 
//R
LESS()LESS()                  //R < < 
STRINGIZE( LESS()LESS() )     //R "<<" 

#define COMMA() ,
#define AND() &
#define CHAR() char
#define STAR() *

// Make sure no whitespace gets inserted in between the operator symbols
//R #line 56 "t_9_003.cpp"
void foo(char&, char)               //R void foo(char&, char) 
void foo(char *)                    //R void foo(char *) 
void foo(char *&)                   //R void foo(char *&) 
void foo(CHAR()AND()COMMA() CHAR()) //R void foo(char&, char) 
void foo(CHAR() STAR())             //R void foo(char *) 
void foo(CHAR() STAR()AND())        //R void foo(char *&)