Skip to content

Commit 9ac7062

Browse files
PR #1819: fix compilation with AppleClang (#1820)
Imported from GitHub PR #1819 Fix the following error: absl/random/internal/randen_detect.cc:123:12: error: no member named 'nullopt' in namespace 'std'; did you mean 'absl::nullopt'? 123 | return std::nullopt; | ^~~~~~~~~~~~ | absl::nullopt absl/types/optional.h:86:43: note: 'absl::nullopt' declared here 86 | ABSL_INTERNAL_INLINE_CONSTEXPR(nullopt_t, nullopt, | ^ Merge b9a2d39 into 7253ff8 Merging this change closes #1819 COPYBARA_INTEGRATE_REVIEW=#1819 from clementperon:master b9a2d39 PiperOrigin-RevId: 722599523 Change-Id: Ie66cbf9daf3b115668194da8b74acd6a43e12a03 Co-authored-by: Clément Péron <[email protected]>
1 parent 98ebd7e commit 9ac7062

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

absl/random/internal/randen_detect.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ static absl::optional<T> ReadSysctlByName(const char* name) {
120120
size_t val_size = sizeof(T);
121121
int ret = sysctlbyname(name, &val, &val_size, nullptr, 0);
122122
if (ret == -1) {
123-
return std::nullopt;
123+
return absl::nullopt;
124124
}
125125
return val;
126126
}

0 commit comments

Comments
 (0)