diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-23 11:48:26 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-10-23 11:48:26 +0000 |
| commit | 441ad1f3f396b69075ce2d72dd0efa2cbb5b4d23 (patch) | |
| tree | abfafd40add6d5022e14f389c0552911026b882f /libstdc++-v3/include/decimal | |
| parent | cf5c3c75059197a009f097fc576ee0ede486d44e (diff) | |
| download | ppe42-gcc-441ad1f3f396b69075ce2d72dd0efa2cbb5b4d23.tar.gz ppe42-gcc-441ad1f3f396b69075ce2d72dd0efa2cbb5b4d23.zip | |
2013-10-23 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/58815
* include/decimal/decimal (decimal32::operator long long(),
decimal64::operator long long(), decimal128::operator long long()):
Add in c++11 mode per n3407.
* testsuite/decimal/pr58815.cc: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@203956 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/decimal')
| -rw-r--r-- | libstdc++-v3/include/decimal/decimal | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/libstdc++-v3/include/decimal/decimal b/libstdc++-v3/include/decimal/decimal index a8805378d80..c1601180e75 100644 --- a/libstdc++-v3/include/decimal/decimal +++ b/libstdc++-v3/include/decimal/decimal @@ -250,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++() @@ -333,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++() @@ -417,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++() |

