1 // Boost nil_generator.hpp header file ----------------------------------------------//
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
6 // http://www.boost.org/LICENSE_1_0.txt)
8 #ifndef BOOST_UUID_NIL_GENERATOR_HPP
9 #define BOOST_UUID_NIL_GENERATOR_HPP
11 #include <boost/uuid/uuid.hpp>
16 // generate a nil uuid
17 struct nil_generator {
18 typedef uuid result_type;
20 uuid operator()() const {
21 // initialize to all zeros
27 inline uuid nil_uuid() {
28 return nil_generator()();
31 }} // namespace boost::uuids
33 #endif // BOOST_UUID_NIL_GENERATOR_HPP