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_5_038.cpp
Jeff Trull ac31d13c6a Implement support for digit separators in preprocessor expressions
Integers with digit separators are already recognized as literal
tokens. This commit adds proper interpretation of them as integers for
use in expressions e.g. with #if
2025-11-16 17:23:04 -08:00

26 lines
745 B
C++

/*=============================================================================
Boost.Wave: A Standard compliant C++ preprocessor library
http://www.boost.org/
Copyright (c) 2022 Jeff Trull. 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)
=============================================================================*/
// Verify that long integer literals from a macro expansion parse correctly
// This test covers #162
//O --c++17
//O -DFOO=0x1234567ULL
#define BAZ (FOO*2UL+1UL)
#define BAR (BAZ + 1ULL)
#if defined(BAR) && (BAR == 0x246'8AD0)
struct Bar {};
#else
#endif
//R #line 20 "t_5_038.cpp"
//R struct Bar {};