首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

operators (std::independent_bits_engine)

template< class CharT, class Traits, class Engine, size_t w, class UIntType > std::basic_ostream<CharT,Traits>& operator<<( std::basic_ostream<CharT,Traits>& ost, const std::independent_bits_engine<Engine,w,UIntType>& e );

(1)

(since C++11)

template< class CharT, class Traits, class Engine, size_t w, class UIntType > std::basic_istream<CharT,Traits>& operator>>( std::basic_istream<CharT,Traits>& ist, std::independent_bits_engine<Engine,w,UIntType>& e );

(2)

(since C++11)

1%29将伪随机数引擎适配器的内部状态序列化为由一个或多个空格分隔的十进制数序列,并将其插入流中。ost忽略流的填充字符和格式标志,不受影响。

2%29恢复伪随机数引擎适配器的内部状态。e从序列化的表示形式中,该表示是由先前调用operator<<使用具有相同的注入区域和相同的流的流CharTTraits如果无法反序列化输入,e保持不变failbit提上ist

如果使用os << x而该表示被还原到相同或不同的对象中。y类型相同的is >> y,然后x==y...

参数

ost

-

output stream to insert the data to

ist

-

input stream to extract the data from

e

-

engine adaptor to serialize or restore

返回值

1%29ost

2%29ist

复杂性

例外

1%29%280%29

2%5月29日投掷std::ios::failure设置时failbit

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com