summaryrefslogtreecommitdiff
path: root/abseil-cpp/absl/random/internal/distribution_caller.h
diff options
context:
space:
mode:
Diffstat (limited to 'abseil-cpp/absl/random/internal/distribution_caller.h')
-rw-r--r--abseil-cpp/absl/random/internal/distribution_caller.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/abseil-cpp/absl/random/internal/distribution_caller.h b/abseil-cpp/absl/random/internal/distribution_caller.h
index fc81b78..0f162a4 100644
--- a/abseil-cpp/absl/random/internal/distribution_caller.h
+++ b/abseil-cpp/absl/random/internal/distribution_caller.h
@@ -18,6 +18,7 @@
#define ABSL_RANDOM_INTERNAL_DISTRIBUTION_CALLER_H_
#include <utility>
+#include <type_traits>
#include "absl/base/config.h"
#include "absl/base/internal/fast_type_id.h"
@@ -32,6 +33,8 @@ namespace random_internal {
// to intercept such calls.
template <typename URBG>
struct DistributionCaller {
+ static_assert(!std::is_pointer<URBG>::value,
+ "You must pass a reference, not a pointer.");
// SFINAE to detect whether the URBG type includes a member matching
// bool InvokeMock(base_internal::FastTypeIdType, void*, void*).
//