2011-10-12 20:28:33 +00:00
|
|
|
#ifndef SPROUT_RANDOM_UNIQUE_SEED_HPP
|
|
|
|
#define SPROUT_RANDOM_UNIQUE_SEED_HPP
|
|
|
|
|
2011-10-25 13:04:54 +00:00
|
|
|
#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR
|
|
|
|
# include <cstddef>
|
|
|
|
# include <type_traits>
|
|
|
|
#endif
|
2011-10-12 20:28:33 +00:00
|
|
|
#include <sprout/config.hpp>
|
|
|
|
#include <sprout/functional/hash/hash.hpp>
|
|
|
|
#include <sprout/preprocessor/unique_string.hpp>
|
|
|
|
|
|
|
|
//
|
|
|
|
// SPROUT_UNIQUE_SEED
|
|
|
|
//
|
2011-10-25 13:04:54 +00:00
|
|
|
#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR
|
|
|
|
# define SPROUT_UNIQUE_SEED (::std::integral_constant< ::std::size_t, ::sprout::hash_value(SPROUT_PP_UNIQUE_STRING)>::value)
|
|
|
|
#else
|
|
|
|
# define SPROUT_UNIQUE_SEED (::sprout::hash_value(SPROUT_PP_UNIQUE_STRING))
|
|
|
|
#endif
|
2011-10-12 20:28:33 +00:00
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_RANDOM_UNIQUE_SEED_HPP
|
|
|
|
|