[PATCH] D28472: Move _PairT declaration out of __hash_combine to avoid warning under C++98

Dimitry Andric via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 12:40:33 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL291476: Move _PairT declaration out of __hash_combine to avoid warning under C++98 (authored by dim).

Changed prior to commit:
  https://reviews.llvm.org/D28472?vs=83654&id=83672#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D28472

Files:
  libcxx/trunk/include/memory


Index: libcxx/trunk/include/memory
===================================================================
--- libcxx/trunk/include/memory
+++ libcxx/trunk/include/memory
@@ -3344,12 +3344,13 @@
     }
 };
 
+struct _PairT {
+  size_t first;
+  size_t second;
+};
+
 _LIBCPP_INLINE_VISIBILITY
 inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
-    struct _PairT {
-      size_t first;
-      size_t second;
-    };
     typedef __scalar_hash<_PairT> _HashT;
     const _PairT __p = {__lhs, __rhs};
     return _HashT()(__p);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28472.83672.patch
Type: text/x-patch
Size: 541 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170109/ba8aba15/attachment.bin>


More information about the cfe-commits mailing list