[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-22 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #13 from Paolo Carlini --- Thus, let's make a decision: either this is a bug, importance as submitted, about conversions to integer, as appeared to be, or it's a catch all bug about all the issues with the TR decimal + all the work to

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-22 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #12 from Janis Johnson --- I obviously don't know C++ very well and the decimal float support in libstdc++ is very ugly. It would be nice if someone rewrites it in actual C++ someday; the tests should help with that effort.

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-22 Thread q1 at oxyba dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #11 from ulf --- i see evil implicit conversion. i modified lines 254, 337 and 421 to explicit operator long long() const { return (long long)__val; } like suggested in n3407. #include int main(){ std::decimal::decimal32 x(10

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-22 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-22 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #9 from Janis Johnson --- I haven't paid attention to decimal float since leaving IBM, so it was very interesting to see the updated C++11 working paper. It makes sense to me to use C++11 functionality in the GNU C++ decimal float sup

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-22 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #8 from Daniel Krügler --- (In reply to Paolo Carlini from comment #6) I also would like to encourage using explicit conversion functions. This is explicitly suggested in the updated C++11 integration document: http://www.open-std.org

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-22 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #7 from Paolo Carlini --- Something like: Index: include/decimal/decimal === --- include/decimal/decimal(revision 203915) +++ include/decimal/decimal(working copy

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-22 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #6 from Paolo Carlini --- Thanks Janis. In C++11 we have *explicit* conversion operators. Would they help? A safe approach woould providing the operators only in c++11 mode.

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-21 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #5 from Janis Johnson --- >From Janis in http://gcc.gnu.org/ml/libstdc++/2009-09/msg00115.html The TR defines, within each of the classes decimal32, decimal64, and decimal128, the following conversion: // 3.2.[234].4 conversion to

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-21 Thread janis at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #4 from Janis Johnson --- I vaguely remember a problem with those conversion and have no idea now what it was, but I'll try to find something in the mailing list archives. includes a workaround: /// Non-conforming extension: Conve

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-21 Thread q1 at oxyba dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 ulf changed: What|Removed |Added CC||janis187 at us dot ibm.com --- Comment #3 from ulf

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-21 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 --- Comment #2 from Paolo Carlini --- In any case, keep in mind ulf that we are looking for help in this area: for various reasons, the code isn't really maintained these days (eg, the original implementor moved to another job, etc) Thus, contribu

[Bug c++/58815] Casting/Conversion operator for std::decimal not supported

2013-10-20 Thread daniel.kruegler at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58815 Daniel Krügler changed: What|Removed |Added CC||daniel.kruegler@googlemail.