Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@

#include <cassert>
#include <cstddef>
#include <expected>
#include <optional>
#include <tuple>
#include <type_traits>
#include <utility>
#include <variant>

#include "test_macros.h"
#include "type_algorithms.h"
Expand Down Expand Up @@ -216,8 +219,16 @@ constexpr bool test() {

// C++ standard library types

// These types are guaranteed to be implicit-lifetime.
test_is_implicit_lifetime<std::expected<int, float>>();
test_is_implicit_lifetime<std::optional<float>>();
test_is_implicit_lifetime<std::variant<float, int>>();

#ifdef _LIBCPP_VERSION
// These types should be implicit-lifetime, but they are not guaranteed to be so.
test_is_implicit_lifetime<std::pair<int, float>>();
test_is_implicit_lifetime<std::tuple<int, float>>();
#endif

// Standard C23 types

Expand Down
Loading