Skip to content

Commit b0d3dda

Browse files
committed
Remove bool from basic construction example
1 parent 3048edd commit b0d3dda

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

examples/basic_construction.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22
// Distributed under the Boost Software License, Version 1.0.
33
// https://www.boost.org/LICENSE_1_0.txt
44

5-
#include <boost/decimal.hpp>
5+
#include <boost/decimal/decimal32_t.hpp>
6+
#include <boost/decimal/decimal64_t.hpp>
7+
#include <boost/decimal/iostream.hpp>
68
#include <iostream>
79
#include <iomanip>
810

911
int main()
1012
{
11-
using namespace boost::decimal;
13+
using boost::decimal::decimal32_t;
14+
using boost::decimal::decimal64_t;
15+
using boost::decimal::construction_sign;
16+
using boost::decimal::isinf;
17+
using boost::decimal::isnan;
1218

1319
constexpr decimal32_t val_1 {100}; // Construction from an integer
1420
constexpr decimal32_t val_2 {10, 1}; // Construction from a signed integer and exponent
15-
constexpr decimal32_t val_3 {1U, 2, false}; // Construction from an unsigned integer, exponent, and sign
21+
constexpr decimal32_t val_3 {1U, 2, construction_sign::negative}; // Construction from an unsigned integer, exponent, and sign
1622

1723
std::cout << "Val_1: " << val_1 << '\n'
1824
<< "Val_2: " << val_2 << '\n'

0 commit comments

Comments
 (0)