YSTest: istream.hpp 源文件

YSTest PreAlpha_b800_20170810 The YSLib Test Project

- 首页
- 相关页面
- 模块
- 命名空间
- 类
- 文件

- 文件列表
- 文件成员

istream.hpp
浏览该文件的文档.
1 /*
2 © 2015 FrankHB.
3
4 This file is part of the YSLib project, and may only be used,
5 modified, and distributed under the terms of the YSLib project
6 license, LICENSE.TXT. By continuing to use, modify, or distribute
7 this file you indicate that you have read the license and
8 understand and accept it fully.
9 */
10
28 #ifndef YB_INC_ystdex_istream_hpp_
29 #define YB_INC_ystdex_istream_hpp_ 1
30
31 #include "algorithm.hpp" // for ystdex::equal;
32 #include <istream> // for std::basic_istream;
33 #include <iterator> // for std::istream_iterator;
34
35 namespace ystdex
36 {
37
43 template<typename _type, typename _tChar, class _tTraits>
44 bool
45 stream_equal(std::basic_istream<_tChar, _tTraits>& a,
46 std::basic_istream<_tChar, _tTraits>& b)
47 {
48 using iter_type = std::istream_iterator<_type, _tChar, _tTraits>;
49
50 return ystdex::equal(iter_type(a), iter_type(), iter_type(b), iter_type());
51 }
52
53 } // namespace ystdex;
54
55 #endif
56
algorithm.hpp
泛型算法。
YSLib::a
YB_PURE const _type * a
Definition: YCoreUtilities.h:167
ystdex::cpp2014::equal
bool equal(_tIn1 first1, _tIn1 last1, _tIn2 first2, _tIn2 last2, _fBiPred binary_pred)
Definition: algorithm.hpp:181
ystdex
特性测试宏。
Definition: ydef.h:822
ystdex::stream_equal
bool stream_equal(std::basic_istream< _tChar, _tTraits > &a, std::basic_istream< _tChar, _tTraits > &b)
比较指定流的内容相等。
Definition: istream.hpp:45