Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion common/ast_rewrite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct ExprRecord {
};

using StackRecordKind =
absl::variant<ExprRecord, ArgRecord, ComprehensionRecord>;
std::variant<ExprRecord, ArgRecord, ComprehensionRecord>;

struct StackRecord {
public:
Expand Down
2 changes: 1 addition & 1 deletion common/ast_traverse.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ struct ExprRecord {
};

using StackRecordKind =
absl::variant<ExprRecord, ArgRecord, ComprehensionRecord>;
std::variant<ExprRecord, ArgRecord, ComprehensionRecord>;

struct StackRecord {
public:
Expand Down
2 changes: 1 addition & 1 deletion common/decl_proto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ absl::StatusOr<FunctionDecl> FunctionDeclFromProto(
return decl;
}

absl::StatusOr<absl::variant<VariableDecl, FunctionDecl>> DeclFromProto(
absl::StatusOr<std::variant<VariableDecl, FunctionDecl>> DeclFromProto(
const cel::expr::Decl& decl,
const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
google::protobuf::Arena* absl_nonnull arena) {
Expand Down
4 changes: 2 additions & 2 deletions common/decl_proto_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ TEST_P(DeclFromProtoTest, FromProtoWorks) {
cel::expr::Decl decl_pb;
ASSERT_TRUE(
google::protobuf::TextFormat::ParseFromString(test_case.proto_decl, &decl_pb));
absl::StatusOr<absl::variant<VariableDecl, FunctionDecl>> decl_or =
absl::StatusOr<std::variant<VariableDecl, FunctionDecl>> decl_or =
DeclFromProto(decl_pb, descriptor_pool, &arena);
switch (test_case.decl_type) {
case DeclType::kVariable: {
Expand Down Expand Up @@ -79,7 +79,7 @@ TEST_P(DeclFromProtoTest, FromV1Alpha1ProtoWorks) {
google::api::expr::v1alpha1::Decl decl_pb;
ASSERT_TRUE(
google::protobuf::TextFormat::ParseFromString(test_case.proto_decl, &decl_pb));
absl::StatusOr<absl::variant<VariableDecl, FunctionDecl>> decl_or =
absl::StatusOr<std::variant<VariableDecl, FunctionDecl>> decl_or =
DeclFromV1Alpha1Proto(decl_pb, descriptor_pool, &arena);
switch (test_case.decl_type) {
case DeclType::kVariable: {
Expand Down
2 changes: 1 addition & 1 deletion common/decl_proto_v1alpha1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ absl::StatusOr<FunctionDecl> FunctionDeclFromV1Alpha1Proto(
return FunctionDeclFromProto(name, unversioned, descriptor_pool, arena);
}

absl::StatusOr<absl::variant<VariableDecl, FunctionDecl>> DeclFromV1Alpha1Proto(
absl::StatusOr<std::variant<VariableDecl, FunctionDecl>> DeclFromV1Alpha1Proto(
const google::api::expr::v1alpha1::Decl& decl,
const google::protobuf::DescriptorPool* absl_nonnull descriptor_pool,
google::protobuf::Arena* absl_nonnull arena) {
Expand Down
2 changes: 1 addition & 1 deletion common/type.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static constexpr std::array<TypeKind, 28> kTypeToKindArray = {
TypeKind::kUnknown};

static_assert(kTypeToKindArray.size() ==
absl::variant_size<common_internal::TypeVariant>(),
std::variant_size<common_internal::TypeVariant>(),
"Kind indexer must match variant declaration for cel::Type.");

} // namespace
Expand Down