Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/uuid/nil_generator.hpp @ 16:2665513ce2d3
Add boost headers
author | Chris Cannam |
---|---|
date | Tue, 05 Aug 2014 11:11:38 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
15:663ca0da4350 | 16:2665513ce2d3 |
---|---|
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 | |
6 // http://www.boost.org/LICENSE_1_0.txt) | |
7 | |
8 #ifndef BOOST_UUID_NIL_GENERATOR_HPP | |
9 #define BOOST_UUID_NIL_GENERATOR_HPP | |
10 | |
11 #include <boost/uuid/uuid.hpp> | |
12 | |
13 namespace boost { | |
14 namespace uuids { | |
15 | |
16 // generate a nil uuid | |
17 struct 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 | |
27 inline uuid nil_uuid() { | |
28 return nil_generator()(); | |
29 } | |
30 | |
31 }} // namespace boost::uuids | |
32 | |
33 #endif // BOOST_UUID_NIL_GENERATOR_HPP | |
34 |