1#ifndef MSTL_CORE_ITERATOR_FILE_LINE_ITERATOR_HPP__
2#define MSTL_CORE_ITERATOR_FILE_LINE_ITERATOR_HPP__
3#include "../file/file_constants.hpp"
4#include "../string/string.hpp"
7class MSTL_API file_line_iterator {
9 using value_type = string;
10 using reference =
const string&;
11 using pointer =
const string*;
12 using iterator_category = input_iterator_tag;
16 const file* file_ =
nullptr;
17 mutable string current_line_;
20 file_line_iterator() =
default;
21 explicit file_line_iterator(
const file* f);
23 reference
operator *() const noexcept {
return current_line_; }
24 pointer operator ->() const noexcept {
return ¤t_line_; }
26 file_line_iterator& operator ++();
27 file_line_iterator operator ++(
int);
29 bool operator ==(
const file_line_iterator& b)
const noexcept {
30 return file_ == b.file_;
32 bool operator !=(
const file_line_iterator& b)
const noexcept {
constexpr duration< _INNER __common_rep_t< Rep1, Rep2 >, Period > operator*(const duration< Rep1, Period > &value, const Rep2 &scalar)
乘法运算符(持续时间 * 标量)
bool operator!=(const function< Res(Args...)> &f, nullptr_t null) noexcept
不等于空指针比较
bool operator==(const function< Res(Args...)> &f, nullptr_t null) noexcept
等于空指针比较
#define MSTL_END_NAMESPACE__
结束全局命名空间MSTL
#define MSTL_BEGIN_NAMESPACE__
开始全局命名空间MSTL