[libcxx] r305854 - [libcxx] [test] Fix -Wmismatched-tags in tuple_size_structured_bindings.pass.cpp.

Stephan T. Lavavej via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 20 14:10:53 PDT 2017


Author: stl_msft
Date: Tue Jun 20 16:10:53 2017
New Revision: 305854

URL: http://llvm.org/viewvc/llvm-project?rev=305854&view=rev
Log:
[libcxx] [test] Fix -Wmismatched-tags in tuple_size_structured_bindings.pass.cpp.

Clang and C1XX both complain about mismatched class/struct, but libc++ and MSVC's STL
differ on what they use for tuple_element/tuple_size, so there's no way to win here.

I'm reverting this part of my previous change. In the future, I'll have to suppress
the warning for one compiler or the other.

Modified:
    libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp

Modified: libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp?rev=305854&r1=305853&r2=305854&view=diff
==============================================================================
--- libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp (original)
+++ libcxx/trunk/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple_size_structured_bindings.pass.cpp Tue Jun 20 16:10:53 2017
@@ -117,7 +117,8 @@ template <size_t N>
 int get(Test const&) { static_assert(N == 0, ""); return -1; }
 
 template <>
-struct std::tuple_element<0, Test> {
+class std::tuple_element<0, Test> {
+public:
   typedef int type;
 };
 
@@ -128,7 +129,8 @@ void test_before_tuple_size_specializati
 }
 
 template <>
-struct std::tuple_size<Test> {
+class std::tuple_size<Test> {
+public:
   static const size_t value = 1;
 };
 




More information about the cfe-commits mailing list