ELF: Have __rela_iplt_{start,end} surround .rela.iplt with --pack-dyn-relocs=android.
[llvm-project.git] / libcxx / test / std / iterators / stream.iterators / ostreambuf.iterator / ostreambuf.iter.ops / deref.pass.cpp
blob671d452ec5d58c152314c3846a1516fb923cb436
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <iterator>
11 // class ostreambuf_iterator
13 // ostreambuf_iterator<charT,traits>& operator*();
15 #include <iterator>
16 #include <sstream>
17 #include <cassert>
19 #include "test_macros.h"
21 int main(int, char**)
24 std::ostringstream outf;
25 std::ostreambuf_iterator<char> i(outf);
26 std::ostreambuf_iterator<char>& iref = *i;
27 assert(&iref == &i);
29 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
31 std::wostringstream outf;
32 std::ostreambuf_iterator<wchar_t> i(outf);
33 std::ostreambuf_iterator<wchar_t>& iref = *i;
34 assert(&iref == &i);
36 #endif
38 return 0;