nil_generator.hpp 574 B

12345678910111213141516171819202122232425262728
  1. #ifndef BOOST_UUID_NIL_GENERATOR_HPP_INCLUDED
  2. #define BOOST_UUID_NIL_GENERATOR_HPP_INCLUDED
  3. // Copyright 2010 Andy Tompkins.
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // https://www.boost.org/LICENSE_1_0.txt
  6. #include <boost/uuid/uuid.hpp>
  7. #include <boost/uuid/detail/nil_uuid.hpp>
  8. namespace boost {
  9. namespace uuids {
  10. // generate a nil uuid
  11. struct nil_generator
  12. {
  13. using result_type = uuid;
  14. uuid operator()() const noexcept
  15. {
  16. return {{}};
  17. }
  18. };
  19. }} // namespace boost::uuids
  20. #endif // BOOST_UUID_NIL_GENERATOR_HPP_INCLUDED