From patchwork Thu May 7 07:12:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Fran=C3=A7ois_Dumont?= X-Patchwork-Id: 1284972 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=fdCblEYA; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Hl6M6GJsz9sSc for ; Thu, 7 May 2020 17:12:58 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E423F3959C9D; Thu, 7 May 2020 07:12:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E423F3959C9D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588835573; bh=pFDdzSgGIMDoX3qTHshhgnLuIRyvrM9GcvHZww7hdjE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=fdCblEYAFSTlrcZP5e0plkgqsrFsAh6xR3QFV3qciH6+MNh7A7ySEXKff8hIDstRi Qus2NCLc7oaXPCsu9D2b83HuQSGMMMzcVdXW0egXsXxPHn4akSfkyISW7AcTOpjEgv snPTzl8exP0por2Jy/oMOBVJSFZ2UVEM9ME2cICE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 13274386F44C; Thu, 7 May 2020 07:12:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 13274386F44C Received: by mail-wm1-x32e.google.com with SMTP id m12so245665wmc.0; Thu, 07 May 2020 00:12:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=pFDdzSgGIMDoX3qTHshhgnLuIRyvrM9GcvHZww7hdjE=; b=BI8YYf98h6+DxjThXsR6+ku8WxsH9g7aDsgRjvuGhVDlYOtEa5v6MK+2Zmc3SMyQ0w Z9sxFIDdsG7+5JWWHVegdGljgrLJCT8I93WXkhiShA4+T+JgGnSMxsGXCrAzS1NL1FiL fs4dmev0n+l3m5QvsRKF1SGtsmdidsunO8Hw7NMuVfCNWGUZFoN1FUVeW3CGWbL939dF zCnwXIDRgVT0lHJoMe+6uJr2OV9oNh7Ve/4A7dPVIE1dZl1BRmqQIYHJcODl/n/hl4fj SMVZovwgzu8TgbVuG8qGVQPkm5HACMezP31h8KcyBcQ+egt3HnLzguZESZJosBFfLCeP 1AWw== X-Gm-Message-State: AGi0PuZIam/3TulEeuezTbVGCOcVZSH7t0+/8N4E6bysvMxbE5Ts9fYb nHfn4ZMvo8/tUliJLKriCbSdLkussUU= X-Google-Smtp-Source: APiQypLWyZ+1OMHffN8C1/BHmlUB21zQkLGkTZ7riIrys6tVb0Um10juNaHDPE4C2bajIq/Iad2r7A== X-Received: by 2002:a1c:5683:: with SMTP id k125mr8344682wmb.17.1588835559699; Thu, 07 May 2020 00:12:39 -0700 (PDT) Received: from ?IPv6:2a01:e0a:1dc:b1c0:c8e7:d765:486d:dac7? ([2a01:e0a:1dc:b1c0:c8e7:d765:486d:dac7]) by smtp.googlemail.com with ESMTPSA id a187sm6643811wmh.40.2020.05.07.00.12.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2020 00:12:38 -0700 (PDT) To: "libstdc++@gcc.gnu.org" , gcc-patches Subject: [PATCH] Extend std::copy/std::copy_n char* overload to deque iterator Message-ID: Date: Thu, 7 May 2020 09:12:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Language: fr X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: =?utf-8?q?Fran=C3=A7ois_Dumont_via_Gcc-patches?= From: =?utf-8?q?Fran=C3=A7ois_Dumont?= Reply-To: =?utf-8?q?Fran=C3=A7ois_Dumont?= Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" This patch purpose is to make sure that existing std::copy/std::copy_n overloads for char* will also be used for std::deque iterators when dealing with istreambuf_iterator. It also make sure that it still works when _GLIBCXX_DEBUG is activated.     * include/bits/stl_algo.h (__copy_n_a): Move to ...     * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict     parameter.     (__niter_base(const _Safe_iterator<_Ite, _Seq,     random_access_iterator_tag>&)): New declaration.     (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,     _Deque_iterator<>)): New declaration.     (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):     New declaration.     * include/bits/deque.tcc     (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,     _Deque_iterator<>)): Add definition.     (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):     Add definition.     * include/bits/streambuf_iterator.h     (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt     definition.     * include/debug/safe_iterator.tcc (__niter_base): Add definition.     * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc (test03):     New.     * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/     deque_neg.cc: New.     * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:     New.     * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New.     * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc: New. Already tested for a while on Linux x64 normal and debug modes but I am currently rebuilding everything and will commit only once all succeeded again. Ok ? François diff --git a/libstdc++-v3/include/bits/deque.tcc b/libstdc++-v3/include/bits/deque.tcc index e773f32b256..45207066c48 100644 --- a/libstdc++-v3/include/bits/deque.tcc +++ b/libstdc++-v3/include/bits/deque.tcc @@ -1065,6 +1065,57 @@ _GLIBCXX_END_NAMESPACE_CONTAINER return __result; } +#if __cplusplus >= 201103L + template + __enable_if_t<__is_char<_CharT>::__value, + _GLIBCXX_STD_C::_Deque_iterator<_CharT, _CharT&, _CharT*>> + __copy_move_a2( + istreambuf_iterator<_CharT, char_traits<_CharT> > __first, + istreambuf_iterator<_CharT, char_traits<_CharT> > __last, + _GLIBCXX_STD_C::_Deque_iterator<_CharT, _CharT&, _CharT*> __result) + { + if (__first == __last) + return __result; + + for (;;) + { + const auto __len = __result._M_last - __result._M_cur; + const auto __nb + = std::__copy_n_a(__first, __len, __result._M_cur, false) + - __result._M_cur; + __result += __nb; + + if (__nb != __len) + break; + } + + return __result; + } + + template + __enable_if_t<__is_char<_CharT>::__value, + _GLIBCXX_STD_C::_Deque_iterator<_CharT, _CharT&, _CharT*>> + __copy_n_a( + istreambuf_iterator<_CharT, char_traits<_CharT>> __it, _Size __size, + _GLIBCXX_STD_C::_Deque_iterator<_CharT, _CharT&, _CharT*> __result, + bool __strict) + { + if (__size == 0) + return __result; + + do + { + const auto __len = std::min<_Size>(__result._M_last - __result._M_cur, + __size); + std::__copy_n_a(__it, __len, __result._M_cur, __strict); + __result += __len; + __size -= __len; + } + while (__size != 0); + return __result; + } +#endif + template _OI diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h index 932ece55529..70d8232aece 100644 --- a/libstdc++-v3/include/bits/stl_algo.h +++ b/libstdc++-v3/include/bits/stl_algo.h @@ -705,31 +705,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __result; } - template - _GLIBCXX20_CONSTEXPR - _OutputIterator - __copy_n_a(_InputIterator __first, _Size __n, _OutputIterator __result) - { - if (__n > 0) - { - while (true) - { - *__result = *__first; - ++__result; - if (--__n > 0) - ++__first; - else - break; - } - } - return __result; - } - - template - __enable_if_t<__is_char<_CharT>::__value, _CharT*> - __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT>>, - _Size, _CharT*); - template _GLIBCXX20_CONSTEXPR _OutputIterator @@ -738,7 +713,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return std::__niter_wrap(__result, __copy_n_a(__first, __n, - std::__niter_base(__result))); + std::__niter_base(__result), true)); } template::value) { return __it; } + template + _Ite + __niter_base(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, + std::random_access_iterator_tag>&); + // Reverse the __niter_base transformation to get a // __normal_iterator back again (this assumes that __normal_iterator // is only used to wrap random access iterators, like pointers). @@ -466,6 +471,16 @@ _GLIBCXX_END_NAMESPACE_CONTAINER __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); +#if __cplusplus >= 201103L + template + __enable_if_t<__is_char<_CharT>::__value, + _GLIBCXX_STD_C::_Deque_iterator<_CharT, _CharT&, _CharT*>> + __copy_move_a2( + istreambuf_iterator<_CharT, char_traits<_CharT> >, + istreambuf_iterator<_CharT, char_traits<_CharT> >, + _GLIBCXX_STD_C::_Deque_iterator<_CharT, _CharT&, _CharT*>); +#endif + template _GLIBCXX20_CONSTEXPR inline _OI @@ -539,6 +554,41 @@ _GLIBCXX_END_NAMESPACE_CONTAINER const ::__gnu_debug::_Safe_iterator<_IIte, _ISeq, _ICat>&, const ::__gnu_debug::_Safe_iterator<_OIte, _OSeq, _OCat>&); +#if __cplusplus >= 201103L + template + _GLIBCXX20_CONSTEXPR + _OutputIterator + __copy_n_a(_InputIterator __first, _Size __n, _OutputIterator __result, + bool) + { + if (__n > 0) + { + while (true) + { + *__result = *__first; + ++__result; + if (--__n > 0) + ++__first; + else + break; + } + } + return __result; + } + + template + __enable_if_t<__is_char<_CharT>::__value, _CharT*> + __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT>>, + _Size, _CharT*, bool); + + template + __enable_if_t<__is_char<_CharT>::__value, + _GLIBCXX_STD_C::_Deque_iterator<_CharT, _CharT&, _CharT*>> + __copy_n_a(istreambuf_iterator<_CharT, char_traits<_CharT>>, _Size, + _GLIBCXX_STD_C::_Deque_iterator<_CharT, _CharT&, _CharT*>, + bool); +#endif + /** * @brief Copies the range [first,last) into result. * @ingroup mutating_algorithms diff --git a/libstdc++-v3/include/bits/streambuf_iterator.h b/libstdc++-v3/include/bits/streambuf_iterator.h index d3f1610fc8d..7cdccbef960 100644 --- a/libstdc++-v3/include/bits/streambuf_iterator.h +++ b/libstdc++-v3/include/bits/streambuf_iterator.h @@ -85,7 +85,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L template friend __enable_if_t<__is_char<_CharT2>::__value, _CharT2*> - __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*); + __copy_n_a(istreambuf_iterator<_CharT2>, _Size, _CharT2*, bool); #endif template @@ -399,7 +399,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus >= 201103L template __enable_if_t<__is_char<_CharT>::__value, _CharT*> - __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result) + __copy_n_a(istreambuf_iterator<_CharT> __it, _Size __n, _CharT* __result, + bool __strict __attribute__((__unused__))) { if (__n == 0) return __result; @@ -409,7 +410,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ._M_iterator(__it)); _CharT* __beg = __result; __result += __it._M_sbuf->sgetn(__beg, __n); - __glibcxx_requires_cond(__result - __beg == __n, + __glibcxx_requires_cond(!__strict || __result - __beg == __n, _M_message(__gnu_debug::__msg_inc_istreambuf) ._M_iterator(__it)); return __result; diff --git a/libstdc++-v3/include/debug/safe_iterator.tcc b/libstdc++-v3/include/debug/safe_iterator.tcc index f90bbf3d125..ca4e2d52d1d 100644 --- a/libstdc++-v3/include/debug/safe_iterator.tcc +++ b/libstdc++-v3/include/debug/safe_iterator.tcc @@ -234,6 +234,12 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION + template + _Ite + __niter_base(const ::__gnu_debug::_Safe_iterator<_Ite, _Seq, + std::random_access_iterator_tag>& __it) + { return __it.base(); } + template _OI diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc index fe04e9342e7..bc23497ff0e 100644 --- a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc +++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -76,9 +77,34 @@ void test02() VERIFY( !memcmp(buffer.data(), buffer_ref, 16500) ); } +void test03() +{ + using namespace std; + + typedef istreambuf_iterator in_iterator_type; + + ifstream fbuf_ref("istream_unformatted-1.txt"), + fbuf("istream_unformatted-1.txt"); + + char buffer_ref[16500]; + std::deque buffer(16500, 'a'); + + fbuf_ref.read(buffer_ref, 16500); + + in_iterator_type beg(fbuf); + in_iterator_type end; + copy(beg, end, buffer.begin()); + + VERIFY( fbuf_ref.good() ); + VERIFY( fbuf.good() ); + + VERIFY( std::equal(buffer.begin(), buffer.end(), buffer_ref) ); +} + int main() { test01(); test02(); + test03(); return 0; } diff --git a/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc new file mode 100644 index 00000000000..26627e37440 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc @@ -0,0 +1,46 @@ +// Copyright (C) 2020 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do run { xfail *-*-* } } +// { dg-require-debug-mode "" } + +#include +#include +#include +#include + +void test01() +{ + using namespace std; + + typedef istreambuf_iterator in_iterator_type; + + const char data1[] = "Drei Phantasien nach Friedrich Holderlin"; + const string str1(data1); + istringstream iss1(str1); + in_iterator_type beg1(iss1); + in_iterator_type end1; + deque d(sizeof(data1) - 2, '0'); + + copy(beg1, end1, d.begin()); +} + +int main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc new file mode 100644 index 00000000000..ede641820b5 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc @@ -0,0 +1,50 @@ +// Copyright (C) 2020 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +// { dg-do run { target c++11 xfail *-*-* } } +// { dg-require-fileio "" } +// { dg-require-debug-mode "" } + +#include +#include +#include +#include + +void test01() +{ + using namespace std; + + typedef istreambuf_iterator in_iterator_type; + + ifstream fbuf_ref("istream_unformatted-1.txt"), + fbuf("istream_unformatted-1.txt"); + + char buffer_ref[16500]; + deque dq(17000, 'a'); + + fbuf_ref.read(buffer_ref, 16500); + + in_iterator_type beg(fbuf); + copy_n(beg, 17000, dq.begin()); +} + +int +main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc new file mode 100644 index 00000000000..5e1a0c2b75b --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc @@ -0,0 +1,56 @@ +// { dg-do run { target c++11 } } +// { dg-require-fileio "" } + +// Copyright (C) 2020 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include +#include +#include + +#include + +void test01() +{ + using namespace std; + + typedef istreambuf_iterator in_iterator_type; + + ifstream fbuf_ref("istream_unformatted-1.txt"), + fbuf("istream_unformatted-1.txt"); + + char buffer_ref[16500], + buffer[16501]; + + fbuf_ref.read(buffer_ref, 16500); + + in_iterator_type beg(fbuf); + copy_n(beg, 16500, buffer); + + VERIFY( fbuf_ref.good() ); + VERIFY( fbuf.good() ); + + VERIFY( !memcmp(buffer, buffer_ref, 16500) ); +} + +int +main() +{ + test01(); + return 0; +} diff --git a/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc b/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc new file mode 100644 index 00000000000..ace73701b90 --- /dev/null +++ b/libstdc++-v3/testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc @@ -0,0 +1,56 @@ +// { dg-do run { target c++11 } } +// { dg-require-fileio "" } + +// Copyright (C) 2020 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include +#include +#include +#include + +#include + +void test01() +{ + using namespace std; + + typedef istreambuf_iterator in_iterator_type; + + ifstream fbuf_ref("istream_unformatted-1.txt"), + fbuf("istream_unformatted-1.txt"); + + char buffer_ref[16500]; + deque dq(16500, 'a'); + + fbuf_ref.read(buffer_ref, 16500); + + in_iterator_type beg(fbuf); + copy_n(beg, 16500, dq.begin()); + + VERIFY( fbuf_ref.good() ); + VERIFY( fbuf.good() ); + + VERIFY( equal(dq.begin(), dq.end(), buffer_ref) ); +} + +int +main() +{ + test01(); + return 0; +}