mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
sprout/checksum/sha1.hpp 追加
sprout/null_array.hpp -> sprout/pit.hpp リネーム sprout/uuid.hpp 追加
This commit is contained in:
parent
9074c9a1cf
commit
0f8db75fca
22 changed files with 2126 additions and 86 deletions
29
sprout/uuid/nil_generator.hpp
Normal file
29
sprout/uuid/nil_generator.hpp
Normal file
|
@ -0,0 +1,29 @@
|
|||
#ifndef SPROUT_UUID_NIL_GENERATOR_HPP
|
||||
#define SPROUT_UUID_NIL_GENERATOR_HPP
|
||||
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/uuid/uuid.hpp>
|
||||
|
||||
namespace sprout {
|
||||
namespace uuids {
|
||||
//
|
||||
// nil_generator
|
||||
//
|
||||
class nil_generator {
|
||||
public:
|
||||
typedef sprout::uuids::uuid result_type;
|
||||
public:
|
||||
SPROUT_CONSTEXPR result_type operator()() const {
|
||||
return result_type{{0}};
|
||||
}
|
||||
};
|
||||
//
|
||||
// nil_uuid
|
||||
//
|
||||
SPROUT_CONSTEXPR inline sprout::uuids::uuid nil_uuid() {
|
||||
return sprout::uuids::nil_generator()();
|
||||
}
|
||||
} // namespace uuids
|
||||
} // namespace sprout
|
||||
|
||||
#endif // #ifndef SPROUT_UUID_NIL_GENERATOR_HPP
|
Loading…
Add table
Add a link
Reference in a new issue