ELC in dev
ELC-lang
载入中...
搜索中...
未找到
elc::defs::stream_n::endline_t结构体 参考

Public 成员函数

template<text_ostream_class text_ostream_T, class char_T = typename remove_cvref<text_ostream_T>::char_type>
constexpr decltype(autooperator() (text_ostream_T &stream) const noexcept(noexcept_text_ostream_class< text_ostream_T >)
 
template<text_istream_class text_istream_T, class char_T = typename remove_cvref<text_istream_T>::char_type>
constexpr decltype(autooperator() (text_istream_T &stream) const noexcept(noexcept_text_istream_class< text_istream_T >)
 

详细描述

在文件 all_defs.cpp29270 行定义.

成员函数说明

◆ operator()() [1/2]

template<text_istream_class text_istream_T, class char_T = typename remove_cvref<text_istream_T>::char_type>
constexpr decltype(auto) elc::defs::stream_n::endline_t::operator() ( text_istream_T stream) const
inlineconstexprnoexcept

在文件 all_defs.cpp29279 行定义.

29279 {
29280 char_T ch;
29281 while(stream>>ch){
29282 if(ch==char_T{'\n'})
29283 break;
29284 if(ch==char_T{'\r'}){
29285 if(!stream.waitting_for_data() && stream>>ch)
29286 if(ch!=char_T{'\n'})//可能的\r\n结尾
29287 stream.unread(&ch,1);
29288 break;
29289 }
29290 }
29291 return stream;
29292 }
constexpr T down_cast(U a) noexcept
向下转型至

◆ operator()() [2/2]

template<text_ostream_class text_ostream_T, class char_T = typename remove_cvref<text_ostream_T>::char_type>
constexpr decltype(auto) elc::defs::stream_n::endline_t::operator() ( text_ostream_T stream) const
inlineconstexprnoexcept

在文件 all_defs.cpp29272 行定义.

29272 {
29273 stream << char_T{'\n'};
29274 stream.flush();
29275 return stream;
29276 }

该结构体的文档由以下文件生成: