std::basic_syncbuf<CharT,Traits,Allocator>::basic_syncbuf
来自cppreference.com
                    
                                        
                    < cpp | io | basic syncbuf
                    
                                                            
                    | basic_syncbuf() : basic_syncbuf(nullptr) | (1) | |
| explicit basic_syncbuf( streambuf_type* obuf ) : basic_syncbuf( obuf, Allocator() ) {} | (2) | |
| basic_syncbuf( streambuf_type* obuf, const Allocator& a); | (3) | |
| basic_syncbuf( basic_syncbuf&& rhs); | (4) | |
1) 默认构造函数:创建 
std::basic_syncbuf 的实例,将其同步时发生( emit-on-sync )策略设为 false ,被包装流缓冲设为 nullptr ,并以默认构造的 Allocator 为临时存储的分配器。2,3) 创建 
std::basic_syncbuf 的实例,将其同步时发生( emit-on-sync )策略设为 false ,被包装流缓冲设为 obuf ,并以 a 为临时存储的分配器。3) 移动构造函数:通过从另一 
std::basic_syncbuf 对象 rhs 移动所有内容,包括临时存储、被包装流指针、策略及所有其他状态(例如互斥指针),移动构造 std::basic_syncbuf 对象。移动后, rhs 不与流关联,而 rhs.get_wrapped()==nullptr 。 rhs 的基类 std::basic_streambuf 的放置区指针保证为空。销毁被移动的 rhs 将不产生任何输出。参数
| obuf | - | 指向要包装的 std::basic_streambuf 的指针 | 
| a | - | 用于临时存储的分配器 | 
| rhs | - | 作为移动来源的另一 std::basic_syncbuf | 
异常
注解
通常为 std::basic_osyncstream 的适当构造函数所调用。
示例
| 本节未完成 原因:暂无示例 | 
参阅
| [虚] | 将缓冲与关联的字符序列同步 ( std::basic_streambuf<CharT,Traits>的虚受保护成员函数) | 
| 原子地传输整个内部缓冲区给被包装 streambuf (公开成员函数) | 
 
	