duration_style.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // (C) Copyright Howard Hinnant
  2. // (C) Copyright 2011 Vicente J. Botet Escriba
  3. // Use, modification and distribution are subject to the Boost Software License,
  4. // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt).
  6. //
  7. // This code was adapted by Vicente from Howard Hinnant's experimental work
  8. // on chrono i/o to Boost
  9. #ifndef BOOST_CHRONO_IO_DURATION_STYLE_HPP
  10. #define BOOST_CHRONO_IO_DURATION_STYLE_HPP
  11. #include <boost/detail/scoped_enum_emulation.hpp>
  12. namespace boost
  13. {
  14. namespace chrono
  15. {
  16. /**
  17. * Scoped enumeration emulation stating whether the duration I/O style is long or short.
  18. * prefix means duration::rep with whatever stream/locale settings are set for it followed by a long name representing the unit
  19. * symbol means duration::rep with whatever stream/locale settings are set for it followed by a SI unit abbreviation
  20. */
  21. BOOST_SCOPED_ENUM_DECLARE_BEGIN(duration_style)
  22. {
  23. prefix, symbol
  24. }
  25. BOOST_SCOPED_ENUM_DECLARE_END(duration_style)
  26. } // chrono
  27. }
  28. #endif // header