// <decimal> -*- C++ -*-
-// Copyright (C) 2009 Free Software Foundation, Inc.
+// Copyright (C) 2009-2022 Free Software Foundation, Inc.
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
// <http://www.gnu.org/licenses/>.
-/** @file include/decimal/decimal
+/** @file decimal/decimal
* This is a Standard C++ Library header.
*/
that is currently not available.
#endif
-namespace std
+namespace std _GLIBCXX_VISIBILITY(default)
{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
/**
* @defgroup decimal Decimal Floating-Point Arithmetic
* @ingroup numerics
/// Conforming extension: Conversion from scalar decimal type.
decimal32(__decfloat32 __z) : __val(__z) {}
- // 3.2.2.5 Conversion to integral type. (DISABLED)
- //operator long long() const { return (long long)__val; }
+#if __cplusplus >= 201103L
+ // 3.2.2.5 Conversion to integral type.
+ // Note: explicit per n3407.
+ explicit operator long long() const { return (long long)__val; }
+#endif
// 3.2.2.6 Increment and decrement operators.
decimal32& operator++()
/// Conforming extension: Conversion from scalar decimal type.
decimal64(__decfloat64 __z) : __val(__z) {}
- // 3.2.3.5 Conversion to integral type. (DISABLED)
- //operator long long() const { return (long long)__val; }
+#if __cplusplus >= 201103L
+ // 3.2.3.5 Conversion to integral type.
+ // Note: explicit per n3407.
+ explicit operator long long() const { return (long long)__val; }
+#endif
// 3.2.3.6 Increment and decrement operators.
decimal64& operator++()
/// Conforming extension: Conversion from scalar decimal type.
decimal128(__decfloat128 __z) : __val(__z) {}
- // 3.2.4.5 Conversion to integral type. (DISABLED)
- //operator long long() const { return (long long)__val; }
+#if __cplusplus >= 201103L
+ // 3.2.4.5 Conversion to integral type.
+ // Note: explicit per n3407.
+ explicit operator long long() const { return (long long)__val; }
+#endif
// 3.2.4.6 Increment and decrement operators.
decimal128& operator++()
};
#define _GLIBCXX_USE_DECIMAL_ 1
-
} // namespace decimal
- // @} group decimal
+ /// @} group decimal
+
+_GLIBCXX_END_NAMESPACE_VERSION
} // namespace std
#include <decimal/decimal.h>