1 // Copyright (c) 2017-2018 Dr. Colin Hirsch and Daniel Frey
2 // Please see LICENSE for license or visit https://github.com/taocpp/PEGTL/
3 
4 #ifndef TAO_PEGTL_CSTREAM_INPUT_HPP
5 #define TAO_PEGTL_CSTREAM_INPUT_HPP
6 
7 #include <cstdio>
8 
9 #include "buffer_input.hpp"
10 #include "config.hpp"
11 #include "eol.hpp"
12 
13 #include "internal/cstream_reader.hpp"
14 
15 namespace tao
16 {
17    namespace TAO_PEGTL_NAMESPACE
18    {
19       template< typename Eol = eol::lf_crlf >
20       struct cstream_input
21          : buffer_input< internal::cstream_reader, Eol >
22       {
23          template< typename T >
cstream_inputtao::TAO_PEGTL_NAMESPACE::cstream_input24          cstream_input( std::FILE* in_stream, const std::size_t in_maximum, T&& in_source )
25             : buffer_input< internal::cstream_reader, Eol >( std::forward< T >( in_source ), in_maximum, in_stream )
26          {
27          }
28       };
29 
30 #ifdef __cpp_deduction_guides
31       template< typename... Ts >
32       cstream_input( Ts&&... )->cstream_input<>;
33 #endif
34 
35    }  // namespace TAO_PEGTL_NAMESPACE
36 
37 }  // namespace tao
38 
39 #endif
40