seqan / product_backlog

This repository is used as product backlog for all SeqAn relevant backlog items. This is intended to organise the work for the team.
2 stars 1 forks source link

deprecate seqan3::views::istreambuf #327

Closed marehr closed 3 years ago

marehr commented 3 years ago

Tasks

From 7983e5d71b964695a5a566d6dd402c39b8a77781 Mon Sep 17 00:00:00 2001
From: marehr <marehr-github@marehr.dialup.fu-berlin.de>
Date: Sun, 18 Apr 2021 12:47:48 +0200
Subject: [PATCH 05/35] TODO: [MISC] deprecate seqan3::views::istreambuf

---
 include/seqan3/range/views/istreambuf.hpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/include/seqan3/range/views/istreambuf.hpp b/include/seqan3/range/views/istreambuf.hpp
index 1d768259e..acf878eb5 100644
--- a/include/seqan3/range/views/istreambuf.hpp
+++ b/include/seqan3/range/views/istreambuf.hpp
@@ -74,7 +74,7 @@ namespace seqan3::views

 /*!\brief                A view factory that returns a view over the stream buffer of an input stream.
  * \tparam istreambuf_t  The type of the stream(buffer); must be std::basic_streambuf or model seqan3::input_stream.
- * \param[in] istreambuf The stream buffer or an input stream of whome the buffer is retrieved.
+ * \param[in] istreambuf The stream buffer or an input stream of whom the buffer is retrieved.
  * \returns
  * \ingroup views
  *
@@ -105,11 +105,16 @@ namespace seqan3::views
  *
  * See the \link views views submodule documentation \endlink for detailed descriptions of the view properties.
  *
- * This adaptor is different from std::ranges::istream_range in that it operates directly on the buffer.
+ * This adaptor is different from std::ranges::basic_istream_view in that it operates directly on the buffer.
  * It further uses a custom streambuf_iterator (not std::istreambuf_iterator) that performs less virtual
  * function calls.
  *
  * \hideinitializer
+ *
+ * \deprecated TODO move to seqan3/io/detail/istreambuf_view.hpp
+ *             TODO is there an alternative? Maybe std::ranges::basic_istream_view?
+ *             maybe constructing an istream via the buffer and wrapping that in the basic_istream_view?
+ *             Is there a problem with Out-of-scope if istream is constructed locally?
  */
 inline constexpr auto istreambuf = detail::istreambuf_fn{};
 //!\}
-- 
2.31.1