[llvm-commits] [llvm] r152000 - in /llvm/trunk: include/llvm/ADT/Hashing.h unittests/ADT/HashingTest.cpp
Duncan Sands
baldrick at free.fr
Sun Mar 4 04:49:00 PST 2012
Hi Chandler,
> --- llvm/trunk/include/llvm/ADT/Hashing.h (original)
> +++ llvm/trunk/include/llvm/ADT/Hashing.h Sun Mar 4 04:23:15 2012
> @@ -124,6 +124,10 @@
> template<typename T, typename U>
> hash_code hash_value(const std::pair<T, U> &arg);
>
> +/// \brief Compute a hash_code for a standard string.
> +template<typename T>
> +hash_code hash_value(const std::basic_string<T> &arg);
> +
>
> /// \brief Override the execution seed with a fixed value.
> ///
> @@ -748,6 +752,13 @@
> return hash_combine(arg.first, arg.second);
> }
>
> +// Declared and documented above, but defined here so that any of the hashing
any of the -> all of the ?
> +// infrastructure is available.
> +template<typename T>
> +hash_code hash_value(const std::basic_string<T> &arg) {
> + return hash_combine_range(arg.begin(), arg.end());
> +}
> +
> } // namespace llvm
>
> #endif
Ciao, Duncan.
More information about the llvm-commits
mailing list