@@ -24,7 +24,7 @@ namespace tao
2424{
2525 namespace TAOCPP_JSON_PEGTL_NAMESPACE
2626 {
27- template < typename Reader, typename Eol = lf_crlf_eol , typename Source = std::string >
27+ template < typename Reader, typename Eol = eol::lf_crlf , typename Source = std::string >
2828 class buffer_input
2929 {
3030 public:
@@ -36,17 +36,16 @@ namespace tao
3636
3737 using iterator_t = internal::iterator;
3838
39- using memory_t = memory_input< tracking_mode::IMMEDIATE, Eol, Source >;
40- using action_t = internal::action_input< buffer_input, tracking_mode::IMMEDIATE >;
39+ using action_t = internal::action_input< buffer_input >;
4140
42- template < typename ... As >
43- buffer_input ( Source in_source, const std::size_t maximum, As&&... as )
41+ template < typename T, typename ... As >
42+ buffer_input ( T&& in_source, const std::size_t maximum, As&&... as )
4443 : m_reader( std::forward< As >( as )... ),
4544 m_maximum ( maximum ),
4645 m_buffer( new char [ maximum ] ),
47- m_current( { 0 , 1 , 0 , m_buffer.get () } ),
46+ m_current( m_buffer.get() ),
4847 m_end( m_buffer.get() ),
49- m_source( std::move ( in_source ) )
48+ m_source( std::forward< T > ( in_source ) )
5049 {
5150 }
5251
@@ -149,12 +148,12 @@ namespace tao
149148 return internal::marker< iterator_t , M >( m_current );
150149 }
151150
152- TAOCPP_JSON_PEGTL_NAMESPACE::position position ( const iterator_t & it ) const noexcept
151+ TAOCPP_JSON_PEGTL_NAMESPACE::position position ( const iterator_t & it ) const
153152 {
154153 return TAOCPP_JSON_PEGTL_NAMESPACE::position ( it, m_source );
155154 }
156155
157- TAOCPP_JSON_PEGTL_NAMESPACE::position position () const noexcept
156+ TAOCPP_JSON_PEGTL_NAMESPACE::position position () const
158157 {
159158 return position ( m_current );
160159 }
0 commit comments