[libcxx-dev] locale decimal point

Steven Lengieza via libcxx-dev libcxx-dev at lists.llvm.org
Thu Jun 27 11:15:37 PDT 2019


Hi,

I am using the following lines of code to get a locale-specific decimal point however, it is causing a crash. I am unable to find any libc++ specific documentation for using std::locale but according to the STL an empty string should always be a valid locale. Does this indicate a bug in the libc++ implementation or are we doing something wrong?

      std::locale my_locale("");
      const std::moneypunct<char>& mp =
          std::use_facet<std::moneypunct<char>>(my_locale);
      text += mp.decimal_point();


Thanks,
Steven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libcxx-dev/attachments/20190627/78293909/attachment.html>


More information about the libcxx-dev mailing list