mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
sprout/random/unique_seed.hpp 更新
at() メンバ関数を constexpr に変更
This commit is contained in:
parent
72d16afcdc
commit
9823888049
6 changed files with 55 additions and 27 deletions
|
@ -1,6 +1,10 @@
|
|||
#ifndef SPROUT_RANDOM_UNIQUE_SEED_HPP
|
||||
#define SPROUT_RANDOM_UNIQUE_SEED_HPP
|
||||
|
||||
#ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR
|
||||
# include <cstddef>
|
||||
# include <type_traits>
|
||||
#endif
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/functional/hash/hash.hpp>
|
||||
#include <sprout/preprocessor/unique_string.hpp>
|
||||
|
@ -8,7 +12,11 @@
|
|||
//
|
||||
// SPROUT_UNIQUE_SEED
|
||||
//
|
||||
#define SPROUT_UNIQUE_SEED (::sprout::hash_value(SPROUT_PP_UNIQUE_STRING))
|
||||
#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
|
||||
|
||||
#endif // #ifndef SPROUT_RANDOM_UNIQUE_SEED_HPP
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue