[all-commits] [llvm/llvm-project] 363a8a: [libc++] money_get::do_get() set failbit and eofbi...

Jason Liu via All-commits all-commits at lists.llvm.org
Wed Jul 28 19:23:25 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 363a8a05988de8f5771fd1330b0fa9a4d2ae4944
      https://github.com/llvm/llvm-project/commit/363a8a05988de8f5771fd1330b0fa9a4d2ae4944
  Author: Jason Liu <jasonliu.development at gmail.com>
  Date:   2021-07-28 (Wed, 28 Jul 2021)

  Changed paths:
    M libcxx/include/locale
    M libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_long_double_en_US.pass.cpp
    M libcxx/test/std/localization/locale.categories/category.monetary/locale.money.get/locale.money.get.members/get_string_en_US.pass.cpp

  Log Message:
  -----------
  [libc++] money_get::do_get() set failbit and eofbit if iterator begin equals end

Summary:
Currently, if we pass in the same iterator for begin and end,
the long double version of do_get would throw a runtime error.

However, according to standard (https://eel.is/c++draft/locale.money.get#virtuals-1),
we should set the failbit and eofbit when no more characters are available.

Differential Revision: https://reviews.llvm.org/D100510




More information about the All-commits mailing list