mirror of
https://github.com/boostorg/wave.git
synced 2026-01-19 16:52:15 +00:00
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
26 lines
745 B
C++
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 {};
|