Index: compat/non_cxx11_lib/type_traits |
diff --git a/util/misc/random_string.h b/compat/non_cxx11_lib/type_traits |
similarity index 57% |
copy from util/misc/random_string.h |
copy to compat/non_cxx11_lib/type_traits |
index 93b3a7fa4620f149529c8af1e9b067b9a81ca4a4..9f11fd4a8a234d2649494f74cd8c15060e1d6c5c 100644 |
--- a/util/misc/random_string.h |
+++ b/compat/non_cxx11_lib/type_traits |
@@ -12,20 +12,26 @@ |
// See the License for the specific language governing permissions and |
// limitations under the License. |
-#ifndef CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |
-#define CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |
+#ifndef CRASHPAD_COMPAT_NON_CXX11_LIB_TYPE_TRAITS_ |
+#define CRASHPAD_COMPAT_NON_CXX11_LIB_TYPE_TRAITS_ |
-#include <string> |
+#include "util/stdlib/cxx.h" |
-namespace crashpad { |
+#if CXX_LIBRARY_VERSION >= 2011 |
-//! \brief Returns a random string. |
-//! |
-//! The string consists of 16 uppercase characters chosen at random. The |
-//! returned string has over 75 bits of randomness (26<sup>16</sup> > |
-//! 2<sup>75</sup>). |
-std::string RandomString(); |
+#include_next <type_traits> |
-} // namespace crashpad |
+#else |
-#endif // CRASHPAD_UTIL_MISC_RANDOM_STRING_H_ |
+namespace std { |
+ |
+template <class T> |
+struct remove_reference { using type = T; }; |
+template <class T> |
+struct remove_reference<T&> { using type = T; }; |
+ |
+} // namespace std |
+ |
+#endif // CXX_LIBRARY_VERSION |
+ |
+#endif // CRASHPAD_COMPAT_NON_CXX11_LIB_TYPE_TRAITS_ |