]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/boost/uuid/nil_generator.hpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / boost / uuid / nil_generator.hpp
CommitLineData
7c673cae
FG
1// Boost nil_generator.hpp header file ----------------------------------------------//
2
3// Copyright 2010 Andy Tompkins.
4// Distributed under the Boost Software License, Version 1.0. (See
5// accompanying file LICENSE_1_0.txt or copy at
92f5a8d4 6// https://www.boost.org/LICENSE_1_0.txt)
7c673cae
FG
7
8#ifndef BOOST_UUID_NIL_GENERATOR_HPP
9#define BOOST_UUID_NIL_GENERATOR_HPP
10
11#include <boost/uuid/uuid.hpp>
12
13namespace boost {
14namespace uuids {
15
16// generate a nil uuid
17struct nil_generator {
18 typedef uuid result_type;
19
20 uuid operator()() const {
21 // initialize to all zeros
22 uuid u = {{0}};
23 return u;
24 }
25};
26
27inline uuid nil_uuid() {
28 return nil_generator()();
29}
30
31}} // namespace boost::uuids
32
33#endif // BOOST_UUID_NIL_GENERATOR_HPP
34