Skip to content

Commit a814570

Browse files
committed
Fix errors in examples
1 parent 487e105 commit a814570

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/charconv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ int main()
1818
*r_to.ptr = '\0';
1919

2020
decimal64 return_value;
21-
auto r_from = from_chars(buffer, buffer + std::strlen(buffer), return_value);
21+
BOOST_DECIMAL_ATTRIBUTE_UNUSED auto r_from = from_chars(buffer, buffer + std::strlen(buffer), return_value);
2222
assert(r_from);
2323

2424
assert(val == return_value);

examples/rounding_mode.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77

88
int main()
99
{
10-
auto default_rounding_mode = boost::decimal::fegetround(); // Default is fe_dec_to_nearest_from_zero
10+
BOOST_DECIMAL_ATTRIBUTE_UNUSED auto default_rounding_mode = boost::decimal::fegetround(); // Default is fe_dec_to_nearest_from_zero
1111

12-
auto new_rounding_mode = boost::decimal::fesetround(boost::decimal::rounding_mode::fe_dec_to_nearest);
12+
BOOST_DECIMAL_ATTRIBUTE_UNUSED auto new_rounding_mode = boost::decimal::fesetround(boost::decimal::rounding_mode::fe_dec_to_nearest);
1313

1414
assert(default_rounding_mode != new_rounding_mode);
1515

0 commit comments

Comments
 (0)