|
||||
File indexing completed on 2025-01-30 10:02:08
0001 // Boost nil_generator.hpp header file ----------------------------------------------// 0002 0003 // Copyright 2010 Andy Tompkins. 0004 // Distributed under the Boost Software License, Version 1.0. (See 0005 // accompanying file LICENSE_1_0.txt or copy at 0006 // https://www.boost.org/LICENSE_1_0.txt) 0007 0008 #ifndef BOOST_UUID_NIL_GENERATOR_HPP 0009 #define BOOST_UUID_NIL_GENERATOR_HPP 0010 0011 #include <boost/uuid/uuid.hpp> 0012 0013 namespace boost { 0014 namespace uuids { 0015 0016 // generate a nil uuid 0017 struct nil_generator { 0018 typedef uuid result_type; 0019 0020 uuid operator()() const { 0021 // initialize to all zeros 0022 uuid u = {{0}}; 0023 return u; 0024 } 0025 }; 0026 0027 inline uuid nil_uuid() { 0028 return nil_generator()(); 0029 } 0030 0031 }} // namespace boost::uuids 0032 0033 #endif // BOOST_UUID_NIL_GENERATOR_HPP 0034
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |