yes_no_type.hpp 999 B

123456789101112131415161718192021222324252627282930313233
  1. // Boost string_algo library yes_no_type.hpp header file ---------------------------//
  2. // Copyright Pavol Droba 2002-2003.
  3. //
  4. // Distributed under the Boost Software License, Version 1.0.
  5. // (See accompanying file LICENSE_1_0.txt or copy at
  6. // http://www.boost.org/LICENSE_1_0.txt)
  7. // See http://www.boost.org/ for updates, documentation, and revision history.
  8. #ifndef BOOST_STRING_YES_NO_TYPE_DETAIL_HPP
  9. #define BOOST_STRING_YES_NO_TYPE_DETAIL_HPP
  10. namespace boost {
  11. namespace algorithm {
  12. // taken from boost mailing-list
  13. // when yes_no_type will become officially
  14. // a part of boost distribution, this header
  15. // will be deprecated
  16. template<int I> struct size_descriptor
  17. {
  18. typedef char (& type)[I];
  19. };
  20. typedef size_descriptor<1>::type yes_type;
  21. typedef size_descriptor<2>::type no_type;
  22. } // namespace algorithm
  23. } // namespace boost
  24. #endif // BOOST_STRING_YES_NO_TYPE_DETAIL_HPP