Skip to content

Commit 3ded0b6

Browse files
majnemercopybara-github
authored andcommitted
crc: Use absl::nullopt when returning absl::optional
Otherwise we can observe a build failure when absl::optional != std::optional. PiperOrigin-RevId: 716275922 Change-Id: I4918a8901530f0daafeec07e319fd79123358bc1
1 parent b4e899a commit 3ded0b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

absl/crc/internal/cpu_detect.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ static absl::optional<T> ReadSysctlByName(const char* name) {
296296
size_t val_size = sizeof(T);
297297
int ret = sysctlbyname(name, &val, &val_size, nullptr, 0);
298298
if (ret == -1) {
299-
return std::nullopt;
299+
return absl::nullopt;
300300
}
301301
return val;
302302
}

0 commit comments

Comments
 (0)