trie_fwd.hpp 978 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (C) 2020 T. Zachary Laine
  2. //
  3. // Distributed under the Boost Software License, Version 1.0. (See
  4. // accompanying file LICENSE_1_0.txt or copy at
  5. // http://www.boost.org/LICENSE_1_0.txt)
  6. #ifndef BOOST_PARSER_DETAIL_TEXT_TRIE_FWD_HPP
  7. #define BOOST_PARSER_DETAIL_TEXT_TRIE_FWD_HPP
  8. namespace boost::parser::detail { namespace text {
  9. /** A statically polymorphic less-than compariason object type. This is
  10. only necessary for pre-C++14 portablility. */
  11. struct less
  12. {
  13. template<typename T>
  14. bool operator()(T const & lhs, T const & rhs) const
  15. {
  16. return std::less<T>{}(lhs, rhs);
  17. }
  18. };
  19. template<
  20. typename Key,
  21. typename Value,
  22. typename Compare = less,
  23. std::size_t KeySize = 0>
  24. struct trie;
  25. template<typename Key, typename Value, typename Compare = less>
  26. struct trie_map;
  27. template<typename Key, typename Compare = less>
  28. struct trie_set;
  29. }}
  30. #endif