[TableGen] Split DAGISelMatcherOpt FactorNodes into 2 functions. NFC (#125330)
[llvm-project.git] / libcxx / test / std / numerics / rand / rand.dist / rand.dist.bern / rand.dist.bern.negbin / io.pass.cpp
blob63c4b0d1f684636f3f7875733108dcab41a84f60
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: no-localization
11 // <random>
13 // template<class IntType = int>
14 // class negative_binomial_distribution
16 // template <class charT, class traits>
17 // basic_ostream<charT, traits>&
18 // operator<<(basic_ostream<charT, traits>& os,
19 // const negative_binomial_distribution& x);
21 // template <class charT, class traits>
22 // basic_istream<charT, traits>&
23 // operator>>(basic_istream<charT, traits>& is,
24 // negative_binomial_distribution& x);
26 #include <random>
27 #include <sstream>
28 #include <cassert>
30 #include "test_macros.h"
32 int main(int, char**)
35 typedef std::negative_binomial_distribution<> D;
36 D d1(7, .25);
37 std::ostringstream os;
38 os << d1;
39 std::istringstream is(os.str());
40 D d2;
41 is >> d2;
42 assert(d1 == d2);
45 return 0;