2 * Copyright Andrey Semashev 2007 - 2015.
3 * Distributed under the Boost Software License, Version 1.0.
4 * (See accompanying file LICENSE_1_0.txt or copy at
5 * http://www.boost.org/LICENSE_1_0.txt)
8 * \file util_unique_identifier.cpp
9 * \author Andrey Semashev
12 * \brief This header contains tests for the unique identifier name generator.
15 #include <boost/log/utility/unique_identifier_name.hpp>
17 // Some hints to avoid warnings about unused variables in this test
19 #define BOOST_LOG_AUX_UNUSED_ATTR __attribute__((unused))
21 #define BOOST_LOG_AUX_UNUSED_ATTR
24 int main(int, char*[])
26 // Names with the same prefixes may coexist in different lines
27 BOOST_LOG_AUX_UNUSED_ATTR
int BOOST_LOG_UNIQUE_IDENTIFIER_NAME(var
) = 0;
28 BOOST_LOG_AUX_UNUSED_ATTR
int BOOST_LOG_UNIQUE_IDENTIFIER_NAME(var
) = 0;
30 // Names with different prefixes may coexist on the same line
31 BOOST_LOG_AUX_UNUSED_ATTR
int BOOST_LOG_UNIQUE_IDENTIFIER_NAME(var1
) = 0; BOOST_LOG_AUX_UNUSED_ATTR
int BOOST_LOG_UNIQUE_IDENTIFIER_NAME(var2
) = 0;