SeqAn3  3.0.2
The Modern C++ library for sequence analysis.
input.hpp
Go to the documentation of this file.
1 // -----------------------------------------------------------------------------------------------------
2 // Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3 // Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
4 // This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5 // shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6 // -----------------------------------------------------------------------------------------------------
7 
13 #pragma once
14 
15 #include <cassert>
16 #include <fstream>
17 #include <limits>
18 #include <optional>
19 #include <string>
20 #include <type_traits>
21 #include <utility>
22 #include <variant>
23 #include <vector>
32 #include <seqan3/io/exception.hpp>
33 #include <seqan3/std/filesystem>
34 #include <seqan3/io/record.hpp>
37 #include <seqan3/io/detail/record.hpp>
41 
42 namespace seqan3
43 {
44 // ----------------------------------------------------------------------------
45 // structure_file_input_traits
46 // ----------------------------------------------------------------------------
47 
137 template <typename t>
140 SEQAN3_CONCEPT structure_file_input_traits = requires(t v)
141 {
142  // TODO(joergi-w) The expensive concept checks are currently omitted. Check again when compiler has improved.
143  // sequence
148 
149  // id
152 
153  // bpp
154  requires std::is_floating_point_v<typename t::bpp_prob>;
156 
157 // requires container // TODO check Associative container Concept when implemented
158 // <typename t::template bpp_queue
159 // <typename t::template bpp_item
160 // <typename t::bpp_prob, typename t::bpp_partner>>>
161 // && requires(typename t::template bpp_queue // TODO maybe implement also a version that allows emplace_back
162 // <typename t::template bpp_item
163 // <typename t::bpp_prob, typename t::bpp_partner>> value) { value.emplace(1.0, 1); };
164 // requires sequence_container
165 // <typename t::template bpp_container
166 // <typename t::template bpp_queue
167 // <typename t::template bpp_item
168 // <typename t::bpp_prob, typename t::bpp_partner>>>>;
169 
170  // structure
171  requires std::is_same_v<typename t::structure_alphabet, dssp9> // TODO(joergi-w) add aa_structure_concept
174 
175  // structured sequence: tuple composites of seq and structure
176  requires std::is_base_of_v<alphabet_tuple_base
177  <typename t::template structured_seq_alphabet
178  <typename t::seq_alphabet, typename t::structure_alphabet>,
179  typename t::seq_alphabet, typename t::structure_alphabet>,
180  typename t::template structured_seq_alphabet<typename t::seq_alphabet, typename t::structure_alphabet>>;
181 // requires sequence_container
182 // <typename t::template structured_seq_container
183 // <typename t::template structured_seq_alphabet
184 // <typename t::seq_alphabet, typename t::structure_alphabet>>>;
185 
186  // energy: std::optional of floating point number
187  requires std::is_floating_point_v<typename t::energy_type::value_type>;
188 
189  // reactivity [error]
190  requires std::is_floating_point_v<typename t::react_type>;
192 
193  // comment
196 
197  // offset
199 };
201 
202 // ----------------------------------------------------------------------------
203 // structure_file_input_default_traits
204 // ----------------------------------------------------------------------------
205 
220 {
226  // sequence
227 
230 
233 
235  template <typename _seq_alphabet>
237 
238  // id
239 
241  using id_alphabet = char;
242 
244  template <typename _id_alphabet>
246 
247  // base pair probability structure
248 
250  using bpp_prob = double;
251 
253  using bpp_partner = size_t;
254 
256  template <typename _bpp_prob, typename _bpp_partner>
258 
260  template <typename _bpp_item>
262 
264  template <typename _bpp_queue>
266 
267  // fixed structure
268 
270  using structure_alphabet = wuss51;
271 
273  template <typename _structure_alphabet>
275 
276  // combined sequence and structure
277 
279  template <typename _seq_alphabet, typename _structure_alphabet>
281 
283  template <typename _structured_seq_alphabet>
285 
286  // energy
287 
290 
291  // reactivity [error]
292 
294  using react_type = double;
295 
297  template <typename _react_type>
299 
300  // comment
301 
303  using comment_alphabet = char;
304 
306  template <typename _comment_alphabet>
308 
309  // offset
310 
312  using offset_type = size_t;
314 };
315 
319 {
325  using seq_alphabet = aa27;
332  template <typename _seq_alphabet, typename _structure_alphabet>
335 };
336 
337 // ----------------------------------------------------------------------------
338 // structure_file_input
339 // ----------------------------------------------------------------------------
340 
461  detail::fields_specialisation selected_field_ids_ = fields<field::seq, field::id, field::structure>,
462  detail::type_list_of_structure_file_input_formats valid_formats_ = type_list<format_vienna>>
464 {
465 public:
470  using traits_type = traits_type_;
473  using selected_field_ids = selected_field_ids_;
475  using valid_formats = valid_formats_;
477  using stream_char_type = char;
479 
484  field::id,
485  field::bpp,
486  field::structure,
487  field::structured_seq,
488  field::energy,
489  field::react,
490  field::react_err,
491  field::comment,
492  field::offset>;
493 
494  static_assert([]() constexpr
495  {
496  for (field f : selected_field_ids::as_array)
497  if (!field_ids::contains(f))
498  return false;
499  return true;
500  }(),
501  "You selected a field that is not valid for structure files, please refer to the documentation "
502  "of structure_file_input::field_ids for the accepted values.");
503 
504  static_assert([]() constexpr
505  {
506  return !(selected_field_ids::contains(field::structured_seq) &&
508  (selected_field_ids::contains(field::structure))));
509  }(), "You may not select field::structured_seq and either of field::seq and field::structure "
510  "at the same time.");
511 
517  using seq_type = typename traits_type::template seq_container<typename traits_type::seq_alphabet>;
520  using id_type = typename traits_type::template id_container<typename traits_type::id_alphabet>;
522  using bpp_type = typename traits_type::template bpp_container
523  <typename traits_type::template bpp_queue
524  <typename traits_type::template bpp_item
525  <typename traits_type::bpp_prob, typename traits_type::bpp_partner>>>;
527  using structure_type = typename traits_type::template structure_container
528  <typename traits_type::structure_alphabet>;
530  using structured_seq_type = typename traits_type::template structured_seq_container
531  <typename traits_type::template structured_seq_alphabet
532  <typename traits_type::seq_alphabet, typename traits_type::structure_alphabet>>;
534  using energy_type = typename traits_type::energy_type;
536  using react_type = typename traits_type::template react_container<typename traits_type::react_type>;
538  using comment_type = typename traits_type::template comment_container
539  <typename traits_type::comment_alphabet>;
541  using offset_type = typename traits_type::offset_type;
542 
546 
551 
556  using value_type = record_type;
561  using const_reference = void;
563  using size_type = size_t;
567  using iterator = detail::in_file_iterator<structure_file_input>;
569  using const_iterator = void;
571  using sentinel = std::default_sentinel_t;
573 
577  structure_file_input() = delete;
589 
607  selected_field_ids const & SEQAN3_DOXYGEN_ONLY(fields_tag) = selected_field_ids{}) :
608  primary_stream{new std::ifstream{}, stream_deleter_default}
609  {
610  primary_stream->rdbuf()->pubsetbuf(stream_buffer.data(), stream_buffer.size());
611  static_cast<std::basic_ifstream<char> *>(primary_stream.get())->open(filename,
612  std::ios_base::in | std::ios::binary);
613 
614  if (!primary_stream->good())
615  throw file_open_error{"Could not open file " + filename.string() + " for reading."};
616 
617  // possibly add intermediate decompression stream
618  secondary_stream = detail::make_secondary_istream(*primary_stream, filename);
619 
620  // initialise format handler
621  detail::set_format(format, filename);
622  }
623 
639  template <input_stream stream_t, structure_file_input_format file_format>
641  requires std::same_as<typename std::remove_reference_t<stream_t>::char_type, char>
643  structure_file_input(stream_t & stream,
644  file_format const & SEQAN3_DOXYGEN_ONLY(format_tag),
645  selected_field_ids const & SEQAN3_DOXYGEN_ONLY(fields_tag) = selected_field_ids{}) :
646  primary_stream{&stream, stream_deleter_noop},
647  format{detail::structure_file_input_format_exposer<file_format>{}}
648  {
649  static_assert(list_traits::contains<file_format, valid_formats>,
650  "You selected a format that is not in the valid_formats of this file.");
651 
652  // possibly add intermediate decompression stream
653  secondary_stream = detail::make_secondary_istream(*primary_stream);
654  }
655 
657  template <input_stream stream_t, structure_file_input_format file_format>
659  requires std::same_as<typename std::remove_reference_t<stream_t>::char_type, char>
661  structure_file_input(stream_t && stream,
662  file_format const & SEQAN3_DOXYGEN_ONLY(format_tag),
663  selected_field_ids const & SEQAN3_DOXYGEN_ONLY(fields_tag) = selected_field_ids{}) :
664  primary_stream{new stream_t{std::move(stream)}, stream_deleter_default},
665  format{detail::structure_file_input_format_exposer<file_format>{}}
666  {
667  static_assert(list_traits::contains<file_format, valid_formats>,
668  "You selected a format that is not in the valid_formats of this file.");
669 
670  // possibly add intermediate compression stream
671  secondary_stream = detail::make_secondary_istream(*primary_stream);
672  }
674 
694  {
695  // buffer first record
696  if (!first_record_was_read)
697  {
698  read_next_record();
699  first_record_was_read = true;
700  }
701 
702  return {*this};
703  }
704 
718  sentinel end() noexcept
719  {
720  return {};
721  }
722 
746  reference front() noexcept
747  {
748  return *begin();
749  }
751 
753  structure_file_input_options<typename traits_type::seq_legal_alphabet,
754  selected_field_ids::contains(field::structured_seq)> options;
755 
756 protected:
758 
761  record_type record_buffer;
764  std::vector<char> stream_buffer{std::vector<char>(1'000'000)};
766 
774  static void stream_deleter_noop(std::basic_istream<stream_char_type> *) {}
776  static void stream_deleter_default(std::basic_istream<stream_char_type> * ptr) { delete ptr; }
777 
779  stream_ptr_t primary_stream{nullptr, stream_deleter_noop};
781  stream_ptr_t secondary_stream{nullptr, stream_deleter_noop};
782 
784  bool first_record_was_read{false};
786  bool at_end{false};
787 
789  using format_type = typename detail::variant_from_tags<valid_formats,
790  detail::structure_file_input_format_exposer>::type;
792  format_type format;
794 
796  void read_next_record()
797  {
798  // clear the record
799  record_buffer.clear();
800 
801  // at end if we could not read further
802  if ((std::istreambuf_iterator<stream_char_type>{*secondary_stream} ==
804  {
805  at_end = true;
806  return;
807  }
808 
809  assert(!format.valueless_by_exception());
810  std::visit([&] (auto & f)
811  {
812  // read new record
813  if constexpr (selected_field_ids::contains(field::structured_seq))
814  {
815  static_assert(!selected_field_ids::contains(field::structure),
816  "You may not select field::structured_seq and field::structure at the same time.");
818  "You may not select field::structured_seq and field::seq at the same time.");
819  f.read_structure_record(*secondary_stream,
820  options,
821  detail::get_or_ignore<field::structured_seq>(record_buffer), // seq
822  detail::get_or_ignore<field::id>(record_buffer),
823  detail::get_or_ignore<field::bpp>(record_buffer),
824  detail::get_or_ignore<field::structured_seq>(record_buffer), // structure
825  detail::get_or_ignore<field::energy>(record_buffer),
826  detail::get_or_ignore<field::react>(record_buffer),
827  detail::get_or_ignore<field::react_err>(record_buffer),
828  detail::get_or_ignore<field::comment>(record_buffer),
829  detail::get_or_ignore<field::offset>(record_buffer));
830  }
831  else
832  {
833  f.read_structure_record(*secondary_stream,
834  options,
835  detail::get_or_ignore<field::seq>(record_buffer),
836  detail::get_or_ignore<field::id>(record_buffer),
837  detail::get_or_ignore<field::bpp>(record_buffer),
838  detail::get_or_ignore<field::structure>(record_buffer),
839  detail::get_or_ignore<field::energy>(record_buffer),
840  detail::get_or_ignore<field::react>(record_buffer),
841  detail::get_or_ignore<field::react_err>(record_buffer),
842  detail::get_or_ignore<field::comment>(record_buffer),
843  detail::get_or_ignore<field::offset>(record_buffer));
844  }
845  }, format);
846  }
847 
849  friend iterator;
850 };
851 
857 template <input_stream stream_type,
859  structure_file_input_format file_format,
860  detail::fields_specialisation selected_field_ids>
861 structure_file_input(stream_type && stream, file_format const &, selected_field_ids const &)
865 
867 template <input_stream stream_type,
868  structure_file_input_format file_format,
869  detail::fields_specialisation selected_field_ids>
870 structure_file_input(stream_type & stream, file_format const &, selected_field_ids const &)
875 
876 } // namespace seqan3
seqan3::structure_file_input_default_traits_rna::bpp_prob
double bpp_prob
The type for a base pair probability is double.
Definition: input.hpp:250
rna15.hpp
Provides seqan3::rna15, container aliases and string literals.
seqan3::structure_file_input::offset_type
typename traits_type::offset_type offset_type
The type of the offset field (default size_t).
Definition: input.hpp:541
seqan3::structure_file_input::const_iterator
void const_iterator
The const iterator type is void, because files are not const-iterable.
Definition: input.hpp:569
format_vienna.hpp
Provides the seqan3::format_vienna.
fstream
std::basic_string
sequence_container
A more refined container concept than seqan3::container.
utility
seqan3::structure_file_input::traits_type
traits_type_ traits_type
A traits type that defines aliases and template for storage of the fields.
Definition: input.hpp:471
seqan3::structure_file_input_default_traits_aa
A traits type that specifies input as amino acids.
Definition: input.hpp:319
seqan3::structure_file_input::structure_file_input
structure_file_input(structure_file_input const &)=delete
Copy construction is explicitly deleted, because you cannot have multiple access to the same file.
seqan3::structure_file_input::structure_file_input
structure_file_input(stream_t &stream, file_format const &format_tag, selected_field_ids const &fields_tag=selected_field_ids{})
Construct from an existing stream and with specified format.
Definition: input.hpp:643
seqan3::structure_file_input::structure_file_input
structure_file_input(stream_type &stream, file_format const &, selected_field_ids const &) -> structure_file_input< typename structure_file_input<>::traits_type, selected_field_ids, type_list< file_format >>
This is an overloaded member function, provided for convenience. It differs from the above function o...
structure_file_input_traits
The requirements a traits_type for seqan3::structure_file_input must meet.
seqan3::type_list
meta::list< types... > type_list
Type that contains multiple types, an alias for meta::list.
Definition: type_list.hpp:31
seqan3::structure_file_input::id_type
typename traits_type::template id_container< typename traits_type::id_alphabet > id_type
The type of the ID field (default std::string).
Definition: input.hpp:520
seqan3::dssp9
The protein structure alphabet of the characters "HGIEBTSCX".
Definition: dssp9.hpp:61
seqan3::field::offset
@ offset
Sequence (SEQ) relative start position (0-based), unsigned value.
concept.hpp
Stream concepts.
seqan3::structure_file_input::field_types
type_list< seq_type, id_type, bpp_type, structure_type, structured_seq_type, energy_type, react_type, react_type, comment_type, offset_type > field_types
The previously defined types aggregated in a seqan3::type_list.
Definition: input.hpp:545
std::pair
seqan3::structure_file_input::record_type
record< detail::select_types_with_ids_t< field_types, field_ids, selected_field_ids >, selected_field_ids > record_type
The type of the record, a specialisation of seqan3::record; acts as a tuple of the selected field typ...
Definition: input.hpp:549
seqan3::structure_file_input::seq_type
typename traits_type::template seq_container< typename traits_type::seq_alphabet > seq_type
The type of the sequence field (default std::vector of seqan3::rna5).
Definition: input.hpp:518
seqan3::structure_file_input::iterator
detail::in_file_iterator< structure_file_input > iterator
The iterator type of this view (an input iterator).
Definition: input.hpp:567
seqan3::structure_file_input::comment_type
typename traits_type::template comment_container< typename traits_type::comment_alphabet > comment_type
The type of the comment field (default double).
Definition: input.hpp:539
vector
std::vector::size
T size(T... args)
explicitly_convertible_to
Resolves to std::ranges::explicitly_convertible_to<type1, type2>().
seqan3::structure_file_input::size_type
size_t size_type
An unsigned integer type, usually std::size_t.
Definition: input.hpp:563
seqan3::field::id
@ id
The identifier, usually a string.
std::unique_ptr::get
T get(T... args)
input_format_concept.hpp
Provides seqan3::structure_file_input_format.
record.hpp
Provides the seqan3::record template and the seqan3::field enum.
std::function
filesystem
This header includes C++17 filesystem support and imports it into namespace std::filesystem (independ...
structure_file_input_format
The generic concept for structure file in formats.
seqan3::structure_file_input::begin
iterator begin()
Returns an iterator to current position in the file.
Definition: input.hpp:693
std::filesystem::path
seqan3::pack_traits::contains
constexpr bool contains
Whether a type occurs in a pack or not.
Definition: traits.hpp:193
seqan3::structure_file_input::front
reference front() noexcept
Return the record we are currently at in the file.
Definition: input.hpp:746
seqan3::fields
A class template that holds a choice of seqan3::field.
Definition: record.hpp:166
seqan3::structure_file_input::structured_seq_type
typename traits_type::template structured_seq_container< typename traits_type::template structured_seq_alphabet< typename traits_type::seq_alphabet, typename traits_type::structure_alphabet > > structured_seq_type
The type of the sequence-structure field (default std::vector of structured_rna<rna5,...
Definition: input.hpp:532
seqan3::structure_file_input::stream_char_type
char stream_char_type
Character type of the stream(s).
Definition: input.hpp:477
seqan3::seq
constexpr sequenced_policy seq
Global execution policy object for sequenced execution policy.
Definition: execution.hpp:54
seqan3::structure_file_input_default_traits_rna::bpp_partner
size_t bpp_partner
The type for the partner position of a base pair probability is size_t.
Definition: input.hpp:253
rna_structure_alphabet
A concept that indicates whether an alphabet represents RNA structure.
input_options.hpp
Provides seqan3::structure_file_input_options.
aa27.hpp
Provides seqan3::aa27, container aliases and string literals.
seqan3::views::move
auto const move
A view that turns lvalue-references into rvalue-references.
Definition: move.hpp:68
seqan3::rna15
The 15 letter RNA alphabet, containing all IUPAC smybols minus the gap.
Definition: rna15.hpp:49
structured_aa.hpp
Provides the composite of aminoacid with structure alphabets.
seqan3::structure_file_input_default_traits_rna::id_alphabet
char id_alphabet
The alphabet for an identifier string is char.
Definition: input.hpp:241
seqan3::structure_file_input::bpp_type
typename traits_type::template bpp_container< typename traits_type::template bpp_queue< typename traits_type::template bpp_item< typename traits_type::bpp_prob, typename traits_type::bpp_partner > >> bpp_type
The type of the base pair probabilies (default std::vector of std::set<std::pair<double,...
Definition: input.hpp:525
seqan3::structure_file_input::~structure_file_input
~structure_file_input()=default
Destructor is defaulted.
exception.hpp
Provides exceptions used in the I/O module.
seqan3
The main SeqAn3 namespace.
Definition: aligned_sequence_concept.hpp:29
seqan3::structure_file_input_options
The options type defines various option members that influence the behaviour of all or some formats.
Definition: input_options.hpp:28
seqan3::structure_file_input::energy_type
typename traits_type::energy_type energy_type
The type of the energy field (default double).
Definition: input.hpp:534
seqan3::structure_file_input_default_traits_rna::react_type
double react_type
The type of the reactivity and reactivity error is double.
Definition: input.hpp:294
std::istreambuf_iterator
seqan3::rna5
The five letter RNA alphabet of A,C,G,U and the unknown character N.
Definition: rna5.hpp:47
std::make_signed_t
std::format
T format(T... args)
seqan3::structure_file_input
A class for reading structured sequence files, e.g. Stockholm, Connect, Vienna, ViennaRNA bpp matrix ...
Definition: input.hpp:464
misc_input.hpp
Provides various utility functions required only for input.
seqan3::structure_file_input::operator=
structure_file_input & operator=(structure_file_input const &)=delete
Copy assignment is explicitly deleted, because you cannot have multiple access to the same file.
seqan3::structure_file_input::structure_file_input
structure_file_input(structure_file_input &&)=default
Move construction is defaulted.
char.hpp
Provides alphabet adaptations for standard char types.
seqan3::structure_file_input::sentinel
std::default_sentinel_t sentinel
The type returned by end().
Definition: input.hpp:571
seqan3::structure_file_input_default_traits_rna::offset_type
size_t offset_type
The type of the offset is size_t.
Definition: input.hpp:312
seqan3::structure_file_input::operator=
structure_file_input & operator=(structure_file_input &&)=default
Move assignment is defaulted.
seqan3::structure_file_input::valid_formats
valid_formats_ valid_formats
A seqan3::type_list with the possible formats.
Definition: input.hpp:475
seqan3::structure_file_input::selected_field_ids
selected_field_ids_ selected_field_ids
A seqan3::fields list with the fields selected for the record.
Definition: input.hpp:473
seqan3::structure_file_input::structure_file_input
structure_file_input(stream_type &&stream, file_format const &, selected_field_ids const &) -> structure_file_input< typename structure_file_input<>::traits_type, selected_field_ids, type_list< file_format >>
Deduction of the selected fields, the file format and the stream type.
dssp9.hpp
Provides the dssp format for protein structure.
limits
rna5.hpp
Provides seqan3::rna5, container aliases and string literals.
seqan3::structure_file_input::end
sentinel end() noexcept
Returns a sentinel for comparison with iterator.
Definition: input.hpp:718
cassert
seqan3::structured_rna
A seqan3::alphabet_tuple_base that joins a nucleotide alphabet with an RNA structure alphabet.
Definition: structured_rna.hpp:55
seqan3::field
field
An enumerator for the fields used in file formats.
Definition: record.hpp:65
seqan3::structure_file_input::structure_file_input
structure_file_input()=delete
Default constructor is explicitly deleted, you need to give a stream or file name.
seqan3::record< detail::select_types_with_ids_t< field_types, field_ids, selected_field_ids >, selected_field_ids >
seqan3::structure_file_input_default_traits_rna::comment_alphabet
char comment_alphabet
The alphabet for a comment string is char.
Definition: input.hpp:303
std::visit
T visit(T... args)
seqan3::structure_file_input::options
structure_file_input_options< typename traits_type::seq_legal_alphabet, selected_field_ids::contains(field::structured_seq)> options
The options are public and its members can be set directly.
Definition: input.hpp:754
optional
seqan3::structure_file_input_default_traits_rna::structure_alphabet
wuss51 structure_alphabet
The alphabet for a structure annotation is seqan3::phred42.
Definition: input.hpp:270
seqan3::structure_file_input::react_type
typename traits_type::template react_container< typename traits_type::react_type > react_type
The type of the reactivity and reactivity error fields (default double).
Definition: input.hpp:536
in_file_iterator.hpp
Provides the seqan3::detail::in_file_iterator class template.
seqan3::structure_file_input::structure_file_input
structure_file_input(std::filesystem::path filename, selected_field_ids const &fields_tag=selected_field_ids{})
Construct from filename.
Definition: input.hpp:606
seqan3::structured_aa
A seqan3::alphabet_tuple_base that joins an aminoacid alphabet with a protein structure alphabet.
Definition: structured_aa.hpp:54
seqan3::structure_file_input::const_reference
void const_reference
The const_reference type is void, because files are not const-iterable.
Definition: input.hpp:561
seqan3::structure_file_input::structure_type
typename traits_type::template structure_container< typename traits_type::structure_alphabet > structure_type
The type of the structure field (default std::vector of seqan3::wuss51).
Definition: input.hpp:528
traits.hpp
Provides traits for seqan3::type_list.
std::basic_istream
seqan3::structure_file_input_default_traits_rna
The default traits for seqan3::structure_file_input.
Definition: input.hpp:220
writable_alphabet
Refines seqan3::alphabet and adds assignability.
std::unique_ptr
seqan3::aa27
The twenty-seven letter amino acid alphabet.
Definition: aa27.hpp:44
std::numeric_limits
std::vector::data
T data(T... args)
std::set
seqan3::structure_file_input::structure_file_input
structure_file_input(stream_t &&stream, file_format const &format_tag, selected_field_ids const &fields_tag=selected_field_ids{})
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition: input.hpp:661
std::is_base_of_v
T is_base_of_v
variant
std::ifstream
string