[all-commits] [llvm/llvm-project] e356f6: [libc++] Implement `std::expected` P0323R12

Hui via All-commits all-commits at lists.llvm.org
Wed Dec 14 07:45:02 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e356f681f6c46ac35f933dc0cef3b25ceee8b210
      https://github.com/llvm/llvm-project/commit/e356f681f6c46ac35f933dc0cef3b25ceee8b210
  Author: Hui Xie <hui.xie1990 at gmail.com>
  Date:   2022-12-14 (Wed, 14 Dec 2022)

  Changed paths:
    M libcxx/docs/FeatureTestMacroTable.rst
    M libcxx/docs/Status/Cxx2bIssues.csv
    M libcxx/docs/Status/Cxx2bPapers.csv
    M libcxx/include/CMakeLists.txt
    A libcxx/include/__expected/bad_expected_access.h
    A libcxx/include/__expected/expected.h
    A libcxx/include/__expected/unexpect.h
    A libcxx/include/__expected/unexpected.h
    M libcxx/include/__type_traits/is_member_pointer.h
    M libcxx/include/__type_traits/is_scalar.h
    M libcxx/include/__type_traits/is_void.h
    A libcxx/include/expected
    M libcxx/include/libcxx.imp
    M libcxx/include/module.modulemap.in
    M libcxx/include/version
    M libcxx/test/libcxx/assertions/headers_declare_verbose_abort.sh.cpp
    M libcxx/test/libcxx/clang_tidy.sh.cpp
    M libcxx/test/libcxx/double_include.sh.cpp
    M libcxx/test/libcxx/min_max_macros.compile.pass.cpp
    M libcxx/test/libcxx/modules_include.sh.cpp
    M libcxx/test/libcxx/nasty_macros.compile.pass.cpp
    M libcxx/test/libcxx/no_assert_include.compile.pass.cpp
    M libcxx/test/libcxx/private_headers.verify.cpp
    M libcxx/test/libcxx/transitive_includes.sh.cpp
    M libcxx/test/libcxx/transitive_includes/cxx03.csv
    M libcxx/test/libcxx/transitive_includes/cxx11.csv
    M libcxx/test/libcxx/transitive_includes/cxx14.csv
    M libcxx/test/libcxx/transitive_includes/cxx17.csv
    M libcxx/test/libcxx/transitive_includes/cxx20.csv
    M libcxx/test/libcxx/transitive_includes/cxx2b.csv
    A libcxx/test/libcxx/utilities/expected/expected.expected/assert.arrow.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.expected/assert.deref.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.expected/assert.error.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.expected/no_unique_address.compile.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.expected/noexcept.extension.compile.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.expected/value_or.mandates.verify.cpp
    A libcxx/test/libcxx/utilities/expected/expected.unexpected/class.mandates.verify.cpp
    A libcxx/test/libcxx/utilities/expected/expected.unexpected/noexcept.extension.compile.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.unexpected/swap.mandates.verify.cpp
    A libcxx/test/libcxx/utilities/expected/expected.void/assert.deref.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.void/assert.error.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.void/no_unique_address.compile.pass.cpp
    A libcxx/test/libcxx/utilities/expected/expected.void/noexcept.extension.compile.pass.cpp
    A libcxx/test/libcxx/utilities/expected/types.h
    A libcxx/test/libcxx/utilities/expected/version.pass.cpp
    A libcxx/test/std/language.support/support.limits/support.limits.general/expected.version.compile.pass.cpp
    M libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
    A libcxx/test/std/utilities/expected/expected.bad/ctor.error.pass.cpp
    A libcxx/test/std/utilities/expected/expected.bad/error.member.pass.cpp
    A libcxx/test/std/utilities/expected/expected.bad/what.noexcept.compile.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/assign/assign.U.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/assign/assign.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/assign/assign.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/assign/assign.unexpected.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/assign/assign.unexpected.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/assign/emplace.intializer_list.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/assign/emplace.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.convert.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.convert.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.default.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.inplace.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.inplace_init_list.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.u.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.unexpect_init_list.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.unexpected.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/ctor/ctor.unexpected.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/dtor.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/equality/equality.T2.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/equality/equality.other_expected.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/equality/equality.unexpected.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/observers/arrow.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/observers/bool.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/observers/deref.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/observers/error.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/observers/has_value.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/observers/value.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/observers/value_or.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/swap/free.swap.pass.cpp
    A libcxx/test/std/utilities/expected/expected.expected/swap/member.swap.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/assign/assign.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/assign/assign.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/ctad.compile.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/ctor/ctor.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/ctor/ctor.error.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/ctor/ctor.inplace.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/ctor/ctor.inplace_init_list.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/ctor/ctor.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/equality.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/observer/error.const_ref.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/observer/error.const_ref_ref.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/observer/error.ref.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/observer/error.ref_ref.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/swap/swap.free.pass.cpp
    A libcxx/test/std/utilities/expected/expected.unexpected/swap/swap.member.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/assign/assign.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/assign/assign.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/assign/assign.unexpected.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/assign/assign.unexpected.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/assign/emplace.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.convert.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.convert.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.default.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.inplace.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.unexpect.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.unexpect_init_list.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.unexpected.copy.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/ctor/ctor.unexpected.move.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/dtor.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/equality/equality.other_expected.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/equality/equality.unexpected.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/observers/bool.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/observers/deref.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/observers/error.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/observers/has_value.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/observers/value.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/swap/free.swap.pass.cpp
    A libcxx/test/std/utilities/expected/expected.void/swap/member.swap.pass.cpp
    A libcxx/test/std/utilities/expected/types.h
    M libcxx/utils/generate_feature_test_macro_components.py
    M libcxx/utils/generate_header_inclusion_tests.py

  Log Message:
  -----------
  [libc++] Implement `std::expected` P0323R12

Implement `std::expected` https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2022/p0323r12.html

Added tests

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

address comment




More information about the All-commits mailing list