DUDS
Distributed Update of Data from Something
Int128.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of the DUDS project. It is subject to the BSD-style
3  * license terms in the LICENSE file found in the top-level directory of this
4  * distribution and at https://github.com/jjackowski/duds/blob/master/LICENSE.
5  * No part of DUDS, including this file, may be copied, modified, propagated,
6  * or distributed except according to the terms contained in the LICENSE file.
7  *
8  * Copyright (C) 2017 Jeff Jackowski
9  */
10 #include <duds/BuildConfig.h>
11 #ifdef HAVE_INT128
12 #include <boost/multiprecision/cpp_int.hpp>
13 #include <sstream>
14 
15 namespace duds { namespace data {
16 
17 std::istream &operator >> (std::istream &is, __int128 &b) {
19  is >> mpi;
20  b = static_cast<__int128>(mpi);
21  return is;
22 }
23 std::ostream &operator << (std::ostream &os, __int128 const &b) {
25  return os << mpi;
26 }
27 
28 } }
29 
30 #endif
boost::multiprecision::int128_t int128_t
The type used for 128-bit integers.
Definition: Int128.hpp:66
ConversationExtractor & operator>>(ConversationExtractor &ce, Int &i)
Extraction operator to read an integer from a Conversation through a ConversationExtractor object...
ConversationVector & operator<<(ConversationVector &cv, const Int &i)
Insertion operator to add an integer to a ConversationVector object.