Click here to Skip to main content
12,406,687 members (59,864 online)
Click here to Skip to main content

Stats

291.4K views
4K downloads
81 bookmarked
Posted

Wave: a Standard conformant C++ preprocessor library

, 10 Jan 2004
Describes a free and fully Standard conformant C++ preprocessor library
wave.exe
wave.exe
wave
doc
theme
bkd.gif
bkd2.gif
bullet.gif
l_arr.gif
l_arr_disabled.gif
r_arr.gif
r_arr_disabled.gif
uc.gif
u_arr.gif
wave.gif
test
boost-build.jam
cpp_tokens
Jamfile.v2
list_includes
project-root.jam
wave
Jamfile
Jamfile.v2
runtests.sh
test_files
wave
cpplexer
re2clex
cpp.re
test
lextest.in
lextest.output
run_tests.sh
test_lexer.in
test_lexer.output
slex
test
lextest.in
lextest.re2c.output
lextest.slex.output
run_tests.sh
grammars
idllexer
re2clex
idl.re
util
bkd.gif
bkd2.gif
bullet.gif
l_arr.gif
l_arr_disabled.gif
r_arr.gif
r_arr_disabled.gif
u_arr.gif
uc.gif
wave.gif
boost-build.jam
Jamfile.v2
project-root.jam
Jamfile
Jamfile.v2
runtests.sh
cpp.re
lextest.in
lextest.output
run_tests.sh
test_lexer.in
test_lexer.output
lextest.in
lextest.re2c.output
lextest.slex.output
run_tests.sh
// tests qualified names as arguments to operator defined
#define A() 1

////////////////////////////////////////////////////////////////////////////////
#region region_A

// test, whether global macros are (in)visible here
# if defined(A)
#  error "Macro 'A' shouldn't be visible here!"
# endif 
# if !defined(::A)
#  error "Macro '::A' should be visible here!"
# endif 

# define B() 2

// nested region
# region region_B
#  define C() 3

# if !defined(C)
#  error "Macro 'C' should be visible here!"
# endif 
# if !defined(::region_A::region_B::C)
#  error "Macro '::region_A::region_B::C' should be visible here!"
# endif 

# endregion

#endregion // region_A

# if defined(region_B::C)
#  error "Macro 'region_B::C' shouldn't be visible here!"
# endif 
# if !defined(region_A::region_B::C)
#  error "Macro 'region_A::region_B::C' should be visible here!"
# endif 
# if !defined(::region_A::region_B::C)
#  error "Macro '::region_A::region_B::C' should be visible here!"
# endif 

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Hartmut Kaiser
United States United States
Actively involved in Boost and the development of the Spirit parser construction framework.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160730.1 | Last Updated 11 Jan 2004
Article Copyright 2003 by Hartmut Kaiser
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid