/*=============================================================================
Wave: A Standard compliant C++ preprocessor
Copyright (c) 2001-2004 Hartmut Kaiser
http://spirit.sourceforge.net/
Use, modification and distribution is subject to 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)
See Copyright.txt for full acknowledgements.
=============================================================================*/
// Tests macro expansion order in conjunction with the need to skip expansion
// of the same macro as it is currently expanded.
#define CONCAT(a, b) a ## b
#define CONCAT_INDIRECT() CONCAT
CONCAT(CON, CAT)(1, 2)
//E #line 21 "test_files/test2.cpp"
//E CONCAT(1, 2)
CONCAT(CON, CAT(1, 2))
//E CONCAT(1, 2)
CONCAT(CONCAT_, INDIRECT)()(1, 2)
//E 12
CONCAT(CONCAT_, INDIRECT())(1, 2)
//E CONCAT(1, 2)
CONCAT(1, CONCAT(2, 3))
//L (30): error: pasting the following two tokens does not give a valid preprocessing token: "1" and "CONCAT"
//R 1