summaryrefslogtreecommitdiff
path: root/absl/container/internal/hash_generator_testing.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/container/internal/hash_generator_testing.h')
-rw-r--r--absl/container/internal/hash_generator_testing.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/absl/container/internal/hash_generator_testing.h b/absl/container/internal/hash_generator_testing.h
index 27962c35..6869fe45 100644
--- a/absl/container/internal/hash_generator_testing.h
+++ b/absl/container/internal/hash_generator_testing.h
@@ -19,6 +19,7 @@
#define ABSL_CONTAINER_INTERNAL_HASH_GENERATOR_TESTING_H_
#include <stdint.h>
+
#include <algorithm>
#include <iosfwd>
#include <random>
@@ -27,11 +28,12 @@
#include <utility>
#include "absl/container/internal/hash_policy_testing.h"
+#include "absl/memory/memory.h"
#include "absl/meta/type_traits.h"
#include "absl/strings/string_view.h"
namespace absl {
-inline namespace lts_2019_08_08 {
+ABSL_NAMESPACE_BEGIN
namespace container_internal {
namespace hash_internal {
namespace generator_internal {
@@ -130,6 +132,13 @@ struct Generator<std::tuple<Ts...>> {
}
};
+template <class T>
+struct Generator<std::unique_ptr<T>> {
+ std::unique_ptr<T> operator()() const {
+ return absl::make_unique<T>(Generator<T>()());
+ }
+};
+
template <class U>
struct Generator<U, absl::void_t<decltype(std::declval<U&>().key()),
decltype(std::declval<U&>().value())>>
@@ -146,7 +155,7 @@ using GeneratedType = decltype(
} // namespace hash_internal
} // namespace container_internal
-} // inline namespace lts_2019_08_08
+ABSL_NAMESPACE_END
} // namespace absl
#endif // ABSL_CONTAINER_INTERNAL_HASH_GENERATOR_TESTING_H_