]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/include/decimal/decimal
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / include / decimal / decimal
index 8ef5a91c0ca18882e5d6b2fa4a57a05b1abdb8d2..cf021e5e568eef24a6d505330bcaaf6febee1f3c 100644 (file)
@@ -1,6 +1,6 @@
 // <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
@@ -21,7 +21,7 @@
 // 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
@@ -248,8 +250,11 @@ namespace decimal
     /// 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++()
@@ -331,8 +336,11 @@ namespace decimal
     /// 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++()
@@ -415,8 +423,11 @@ namespace decimal
     /// 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++()
@@ -472,9 +483,10 @@ namespace decimal
   };
 
 #define _GLIBCXX_USE_DECIMAL_ 1
-
 } // namespace decimal
-  // @} group decimal
+  /// @} group decimal
+
+_GLIBCXX_END_NAMESPACE_VERSION
 } // namespace std
 
 #include <decimal/decimal.h>