draconisplusplus/include/rfl/parsing/is_view_reader.hpp

24 lines
595 B
C++
Raw Normal View History

2024-05-31 22:59:00 -04:00
#ifndef RFL_PARSING_ISVIEWREADER_HPP_
#define RFL_PARSING_ISVIEWREADER_HPP_
#include "ViewReader.hpp"
namespace rfl ::parsing {
2024-06-08 14:10:59 -04:00
template <class T>
class is_view_reader;
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class T>
class is_view_reader : public std::false_type {};
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class R, class W, class NamedTupleType, class ProcessorsType>
2024-06-16 00:13:15 -04:00
class is_view_reader<ViewReader<R, W, NamedTupleType, ProcessorsType>> : public std::true_type {};
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
template <class T>
constexpr bool is_view_reader_v =
2024-06-16 00:13:15 -04:00
is_view_reader<std::remove_cvref_t<std::remove_pointer_t<T>>>::value;
2024-05-31 22:59:00 -04:00
2024-06-08 14:10:59 -04:00
} // namespace rfl::parsing
2024-05-31 22:59:00 -04:00
#endif