https://gcc.gnu.org/onlinedocs/gcc-13.2.0/libstdc++/api/a10385.html should be the latest. I thought there is a std::string/char* constructor.
-----Original Message----- From: Ming Cheng Sent: Wednesday, January 24, 2024 2:20 PM To: Jonathan Wakely <jwakely....@gmail.com> Cc: GCC Development <gcc@gcc.gnu.org> Subject: RE: GCC Decimal128 class Hi Jonathan, Yes, I can compile now. Come to Decimal128 document, I got this page https://gcc.gnu.org/onlinedocs/gcc-4.8.1/libstdc++/api/a00702.html : https://gcc.gnu.org/onlinedocs/gcc-4.8.1/libstdc++/api/a00702.html. Is there a latest update? Warm Regards. Ming -----Original Message----- From: Jonathan Wakely <jwakely....@gmail.com> Sent: Tuesday, January 23, 2024 10:18 PM To: Ming Cheng <ming.ch...@flextrade.com> Cc: GCC Development <gcc@gcc.gnu.org> Subject: Re: GCC Decimal128 class ATTENTION: This email was sent from someone outside of FlexTrade. Always use caution when opening attachments or clicking links. On Tue, 23 Jan 2024 at 14:16, Jonathan Wakely <jwakely....@gmail.com> wrote: > > On Tue, 23 Jan 2024 at 02:01, Ming Cheng via Gcc <gcc@gcc.gnu.org> wrote: > > > > Hi GCC, > > > > Seems Janis is not at IBM. Wondering someone from GCC can help my question? > > > > Thanks > > Ming. > > > > From: Ming Cheng > > Sent: Monday, January 22, 2024 3:18 PM > > To: janis...@us.ibm.com > > Subject: GCC Decimal128 class > > > > Hi Janis Johnson, > > > > I want to test GCC Decimal128 class. > > > > This is my code: > > > > #include <stdio.h> > > #include <cstdlib> > > #include <vector> > > #include <algorithm> > > #include <ctime> > > #include <random> > > #include <string> > > #include <fstream> > > #include <fenv.h> > > #include "decimal/decimal.h" > > > > int main (void) > > { > > std::decimal::decimal128 d128{}; > > return 0; > > } > > > > When I compile by c++23 (/opt/rh/gcc-toolset-13/root/bin/g++ > > -rdynamic -std=c++23 -O2 ......) I got this error: > > > > /opt/rh/gcc-toolset-13/root/usr/include/c++/13/decimal/decimal.h:46:10: > > error: 'decimal32' does not name a type > > 46 | inline decimal32::decimal32(decimal64 __r) : > > __val(__r.__getval()) {} > > > > I checked /opt/rh/gcc-toolset-13/root/usr/include/c++/13/decimal/decimal.h > > and found this comments: > > > > /** @file decimal/decimal.h > > * This is an internal header file, included by other library headers. > > * Do not attempt to use it directly. @headername{decimal} */ > > > > Wondering whether you can give some advice? > > > Like it says, you don't include <decimal/decimal.h> > > You want <decimal/decimal> instead. That works fine. This is documented at: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_headers.html#table.decfp_headers This communication is for informational purposes only. The contents of this transmission are confidential and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error, please notify the sender by return email and delete this message from your system. FlexTrade Systems Inc., its subsidiaries and affiliates do not guarantee the completeness and accuracy of this transmission's contents. Moreover, FlexTrade Systems Inc., its subsidiaries and affiliates do not guarantee this communication to be free of viruses and accept no liability for any damage caused thereof.