File Coverage

/usr/local/lib/perl5/site_perl/5.26.1/x86_64-linux/CPP/Boost/Mini.x/i/boost/uuid/nil_generator.hpp
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine n/a
pod n/a
total 3 3 100.0


line stmt bran cond sub pod time code
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
12              
13             namespace boost {
14             namespace uuids {
15              
16             // generate a nil uuid
17             struct nil_generator {
18             typedef uuid result_type;
19            
20 1003           uuid operator()() const {
21             // initialize to all zeros
22 1003           uuid u = {{0}};
23 1003           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