2013-08-08 09:54:33 +00:00
|
|
|
/*=============================================================================
|
2019-01-07 08:47:17 +00:00
|
|
|
Copyright (c) 2011-2019 Bolero MURAKAMI
|
2013-08-08 09:54:33 +00:00
|
|
|
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)
|
|
|
|
=============================================================================*/
|
2011-10-25 09:16:27 +00:00
|
|
|
#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}};
|
|
|
|
}
|
|
|
|
};
|
2013-04-14 10:42:34 +00:00
|
|
|
|
2011-10-25 09:16:27 +00:00
|
|
|
//
|
|
|
|
// nil_uuid
|
|
|
|
//
|
2012-10-06 04:53:07 +00:00
|
|
|
inline SPROUT_CONSTEXPR sprout::uuids::uuid
|
|
|
|
nil_uuid() {
|
|
|
|
return sprout::uuids::nil_generator()();
|
|
|
|
}
|
2011-10-25 09:16:27 +00:00
|
|
|
} // namespace uuids
|
|
|
|
} // namespace sprout
|
|
|
|
|
|
|
|
#endif // #ifndef SPROUT_UUID_NIL_GENERATOR_HPP
|