2013-04-13 14:30:25 +02:00
|
|
|
/*
|
2015-01-25 15:32:33 +01:00
|
|
|
* Copyright Andrey Semashev 2007 - 2015.
|
2013-04-13 14:30:25 +02:00
|
|
|
* 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)
|
|
|
|
*/
|
|
|
|
/*!
|
|
|
|
* \file util_unique_identifier.cpp
|
|
|
|
* \author Andrey Semashev
|
|
|
|
* \date 24.01.2009
|
|
|
|
*
|
|
|
|
* \brief This header contains tests for the unique identifier name generator.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <boost/log/utility/unique_identifier_name.hpp>
|
|
|
|
|
2014-03-01 15:15:42 +01:00
|
|
|
// Some hints to avoid warnings about unused variables in this test
|
|
|
|
#if defined(__GNUC__)
|
|
|
|
#define BOOST_LOG_AUX_UNUSED_ATTR __attribute__((unused))
|
|
|
|
#else
|
|
|
|
#define BOOST_LOG_AUX_UNUSED_ATTR
|
|
|
|
#endif
|
|
|
|
|
2013-04-13 14:30:25 +02:00
|
|
|
int main(int, char*[])
|
|
|
|
{
|
|
|
|
// Names with the same prefixes may coexist in different lines
|
2014-03-01 15:15:42 +01:00
|
|
|
BOOST_LOG_AUX_UNUSED_ATTR int BOOST_LOG_UNIQUE_IDENTIFIER_NAME(var) = 0;
|
|
|
|
BOOST_LOG_AUX_UNUSED_ATTR int BOOST_LOG_UNIQUE_IDENTIFIER_NAME(var) = 0;
|
2013-04-13 14:30:25 +02:00
|
|
|
|
|
|
|
// Names with different prefixes may coexist on the same line
|
2014-03-01 15:15:42 +01:00
|
|
|
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;
|
2013-04-13 14:30:25 +02:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|