File indexing completed on 2025-01-19 09:25:00
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_BEAST_UNIT_TEST_DETAIL_CONST_CONTAINER_HPP
0011 #define BOOST_BEAST_UNIT_TEST_DETAIL_CONST_CONTAINER_HPP
0012
0013 namespace boost {
0014 namespace beast {
0015 namespace unit_test {
0016 namespace detail {
0017
0018
0019
0020
0021
0022 template<class Container>
0023 class const_container
0024 {
0025 private:
0026 using cont_type = Container;
0027
0028 cont_type m_cont;
0029
0030 protected:
0031 cont_type& cont()
0032 {
0033 return m_cont;
0034 }
0035
0036 cont_type const& cont() const
0037 {
0038 return m_cont;
0039 }
0040
0041 public:
0042 using value_type = typename cont_type::value_type;
0043 using size_type = typename cont_type::size_type;
0044 using difference_type = typename cont_type::difference_type;
0045 using iterator = typename cont_type::const_iterator;
0046 using const_iterator = typename cont_type::const_iterator;
0047
0048
0049 bool
0050 empty() const
0051 {
0052 return m_cont.empty();
0053 }
0054
0055
0056 size_type
0057 size() const
0058 {
0059 return m_cont.size();
0060 }
0061
0062
0063
0064 const_iterator
0065 begin() const
0066 {
0067 return m_cont.cbegin();
0068 }
0069
0070 const_iterator
0071 cbegin() const
0072 {
0073 return m_cont.cbegin();
0074 }
0075
0076 const_iterator
0077 end() const
0078 {
0079 return m_cont.cend();
0080 }
0081
0082 const_iterator
0083 cend() const
0084 {
0085 return m_cont.cend();
0086 }
0087
0088 };
0089
0090 }
0091 }
0092 }
0093 }
0094
0095 #endif