| 765 | bool StoreNullTerminator, class KeySizeT, class IndexSizeT, |
| 766 | class GrowthPolicy> |
| 767 | class array_hash : private value_container<T>, |
| 768 | private Hash, |
| 769 | private GrowthPolicy { |
| 770 | private: |
| 771 | template <typename U> |
| 772 | using has_mapped_type = |
| 773 | typename std::integral_constant<bool, !std::is_same<U, void>::value>; |
| 774 | |
| 775 | /** |
| 776 | * If there is a mapped type in array_hash, we store the values in m_values of |
| 777 | * value_container class and we store an index to m_values in the bucket. The |
| 778 | * index is of type IndexSizeT. |
| 779 | */ |
| 780 | using array_bucket = tsl::detail_array_hash::array_bucket< |
| 781 | CharT, |
| 782 | typename std::conditional<has_mapped_type<T>::value, IndexSizeT, |
| 783 | void>::type, |
| 784 | KeyEqual, KeySizeT, StoreNullTerminator>; |
| 785 | |
| 786 | public: |
| 787 | template <bool IsConst> |
| 788 | class array_hash_iterator; |
| 789 | |
| 790 | using char_type = CharT; |
| 791 | using key_size_type = KeySizeT; |
| 792 | using index_size_type = IndexSizeT; |
| 793 | using size_type = std::size_t; |
| 794 | using hasher = Hash; |
| 795 | using key_equal = KeyEqual; |
| 796 | using iterator = array_hash_iterator<false>; |
| 797 | using const_iterator = array_hash_iterator<true>; |
| 798 | |
| 799 | /* |
| 800 | * Iterator classes |
| 801 | */ |
| 802 | public: |
| 803 | template <bool IsConst> |
| 804 | class array_hash_iterator { |
| 805 | friend class array_hash; |
| 806 | |
| 807 | private: |
| 808 | using iterator_array_bucket = typename array_bucket::const_iterator; |
| 809 | |
| 810 | using iterator_buckets = typename std::conditional< |
| 811 | IsConst, typename std::vector<array_bucket>::const_iterator, |
| 812 | typename std::vector<array_bucket>::iterator>::type; |
| 813 | |
| 814 | using array_hash_ptr = typename std::conditional<IsConst, const array_hash*, |
| 815 | array_hash*>::type; |
| 816 | |
| 817 | public: |
| 818 | using iterator_category = std::forward_iterator_tag; |
| 819 | using value_type = |
| 820 | typename std::conditional<has_mapped_type<T>::value, T, void>::type; |
| 821 | using difference_type = std::ptrdiff_t; |
| 822 | using reference = typename std::conditional< |
| 823 | has_mapped_type<T>::value, |
| 824 | typename std::conditional< |
nothing calls this directly
no test coverage detected