1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00
Sprout/sprout/preprocessor/unique_string.hpp
2017-07-29 14:20:01 +09:00

54 lines
2.6 KiB
C++

/*=============================================================================
Copyright (c) 2011-2017 Bolero MURAKAMI
https://github.com/bolero-MURAKAMI/Sprout
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)
=============================================================================*/
#ifndef SPROUT_PREPROCESSOR_UNIQUE_STRING_HPP
#define SPROUT_PREPROCESSOR_UNIQUE_STRING_HPP
#include <sprout/config.hpp>
#include <sprout/preprocessor/stringize_all.hpp>
#include <sprout/preprocessor/str_all.hpp>
#include <sprout/preprocessor/some_number.hpp>
//
// SPROUT_PP_UNIQUE_STRING_
// SPROUT_PP_UNIQUE_WSTRING_
// SPROUT_PP_UNIQUE_U16STRING_
// SPROUT_PP_UNIQUE_U32STRING_
//
#define SPROUT_PP_UNIQUE_STRING_(N) \
SPROUT_PP_STRINGIZE(N) SPROUT_PP_STR(" ") SPROUT_PP_STRINGIZE(SPROUT_PP_SOME_NUMBER()) \
SPROUT_PP_STR(" : ") SPROUT_PP_STR(__DATE__) SPROUT_PP_STR(" ") SPROUT_PP_STR(__TIME__) \
SPROUT_PP_STR(" : ") SPROUT_PP_STR(__FILE__) SPROUT_PP_STR(":") SPROUT_PP_STRINGIZE(__LINE__)
#define SPROUT_PP_UNIQUE_WSTRING_(N) \
SPROUT_PP_WSTRINGIZE(N) SPROUT_PP_STR(" ") SPROUT_PP_WSTRINGIZE(SPROUT_PP_SOME_NUMBER()) \
SPROUT_PP_WSTR(" : ") SPROUT_PP_WSTR(__DATE__) SPROUT_PP_WSTR(" ") SPROUT_PP_WSTR(__TIME__) \
SPROUT_PP_WSTR(" : ") SPROUT_PP_WSTR(__FILE__) SPROUT_PP_WSTR(":") SPROUT_PP_WSTRINGIZE(__LINE__)
#define SPROUT_PP_UNIQUE_U16STRING_(N) \
SPROUT_PP_U16STRINGIZE(N) SPROUT_PP_STR(" ") SPROUT_PP_U16STRINGIZE(SPROUT_PP_SOME_NUMBER()) \
SPROUT_PP_U16STR(" : ") SPROUT_PP_U16STR(__DATE__) SPROUT_PP_U16STR(" ") SPROUT_PP_U16STR(__TIME__) \
SPROUT_PP_U16STR(" : ") SPROUT_PP_U16STR(__FILE__) SPROUT_PP_U16STR(":") SPROUT_PP_U16STRINGIZE(__LINE__)
#define SPROUT_PP_UNIQUE_U32STRING_(N) \
SPROUT_PP_U32STRINGIZE(N) SPROUT_PP_STR(" ") SPROUT_PP_U32STRINGIZE(SPROUT_PP_SOME_NUMBER()) \
SPROUT_PP_U32STR(" : ") SPROUT_PP_U32STR(__DATE__) SPROUT_PP_U32STR(" ") SPROUT_PP_U32STR(__TIME__) \
SPROUT_PP_U32STR(" : ") SPROUT_PP_U32STR(__FILE__) SPROUT_PP_U32STR(":") SPROUT_PP_U32STRINGIZE(__LINE__)
//
// SPROUT_PP_UNIQUE_STRING
// SPROUT_PP_UNIQUE_WSTRING
// SPROUT_PP_UNIQUE_U16STRING
// SPROUT_PP_UNIQUE_U32STRING
//
#define SPROUT_PP_UNIQUE_STRING \
SPROUT_PP_UNIQUE_STRING_(SPROUT_PP_SOME_NUMBER())
#define SPROUT_PP_UNIQUE_WSTRING \
SPROUT_PP_UNIQUE_WSTRING_(SPROUT_PP_SOME_NUMBER())
#define SPROUT_PP_UNIQUE_U16STRING \
SPROUT_PP_UNIQUE_U16STRING_(SPROUT_PP_SOME_NUMBER())
#define SPROUT_PP_UNIQUE_U32STRING \
SPROUT_PP_UNIQUE_U32STRING_(SPROUT_PP_SOME_NUMBER())
#endif // #ifndef SPROUT_PREPROCESSOR_UNIQUE_STRING_HPP