1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2024-11-12 21:09:01 +00:00
Sprout/sprout/random/unique_seed.hpp

23 lines
644 B
C++
Raw Normal View History

2011-10-12 20:28:33 +00:00
#ifndef SPROUT_RANDOM_UNIQUE_SEED_HPP
#define SPROUT_RANDOM_UNIQUE_SEED_HPP
#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
//
#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