diff mbox

[C++] - SD-6 Implementation Part 3 - .

Message ID 542CF5F0.6050202@verizon.net
State New
Headers show

Commit Message

Ed Smith-Rowland Oct. 2, 2014, 6:51 a.m. UTC
On 10/01/2014 11:28 AM, Jonathan Wakely wrote:
> On 02/09/14 10:24 +0100, Jonathan Wakely wrote:
>> On 01/09/14 21:46 -0400, Ed Smith-Rowland wrote:
>>> Index: include/bits/stl_function.h
>>> ===================================================================
>>> --- include/bits/stl_function.h    (revision 214680)
>>> +++ include/bits/stl_function.h    (working copy)
>>> @@ -217,6 +217,10 @@
>>>    };
>>>
>>> #if __cplusplus > 201103L
>>> +
>>> +#define __cpp_lib_transparent_operators 201210
>>> +#define __cpp_lib_generic_associative_lookup 201304
>>
>> The generic associative lookup feature is not supported.
>>
>>> Index: testsuite/experimental/feat-lib-fund.cc
>>> ===================================================================
>>> --- testsuite/experimental/feat-lib-fund.cc    (revision 0)
>>> +++ testsuite/experimental/feat-lib-fund.cc    (working copy)
>>> @@ -0,0 +1,25 @@
>>> +// { dg-options "-std=gnu++14" }
>>> +// { dg-do compile }
>>> +
>>> +#include <experimental/optional>
>>> +#include <experimental/string_view>
>>> +
>>> +#if !__has_include(<experimental/optional>)
>>> +#  error "<experimental/optional>"
>>> +#endif
>>> +
>>> +//#if !__has_include(<experimental/net>)
>>> +//#  error "<experimental/net>"
>>> +//#endif
>>> +
>>> +//#if !__has_include(<experimental/any>)
>>> +//#  error "<experimental/any>"
>>> +//#endif
>>
>> This can be uncommented, <experimental/any> is available.
>>
>> OK with those changes.
>
> Ed, the commit at http://gcc.gnu.org/r215752 doesn't have the
> corrections I asked for above and causes a number of test failures,
> could you look into it please?
>
>
OK,

Here is the patch.

Built and tested on x86_64-linux.

OK?

Ed

FWIW, I remember a svn tree corruption while getting this patch ready.
I should have retested everything in the new tree.
Sorry everyone!
2014-10-02  Edward Smith-Rowland  <3dw4rd@verizon.net>

	* include/bits/stl_function.h: generic associative lookup feature
	is not supported.
	* testsuite/experimental/feat-lib-fund.cc:<experimental/any> is
	actually available.
	* testsuite/experimental/feat-cxx14.cc: Add test for __cpp_lib_is_final.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/duration/literals/range.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Adjust.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	Adjust.

Comments

Jonathan Wakely Oct. 2, 2014, 8:52 a.m. UTC | #1
On 02/10/14 02:51 -0400, Ed Smith-Rowland wrote:
>On 10/01/2014 11:28 AM, Jonathan Wakely wrote:
>>Ed, the commit at http://gcc.gnu.org/r215752 doesn't have the
>>corrections I asked for above and causes a number of test failures,
>>could you look into it please?
>>
>>
>OK,
>
>Here is the patch.
>
>Built and tested on x86_64-linux.
>
>OK?

Yes, the library change is OK, thanks for the quick fix.
diff mbox

Patch

Index: include/bits/stl_function.h
===================================================================
--- include/bits/stl_function.h	(revision 215788)
+++ include/bits/stl_function.h	(working copy)
@@ -219,7 +219,7 @@ 
 #if __cplusplus > 201103L
 
 #define __cpp_lib_transparent_operators 201210
-#define __cpp_lib_generic_associative_lookup 201304
+//#define __cpp_lib_generic_associative_lookup 201304
 
   template<>
     struct plus<void>
Index: testsuite/experimental/feat-lib-fund.cc
===================================================================
--- testsuite/experimental/feat-lib-fund.cc	(revision 215788)
+++ testsuite/experimental/feat-lib-fund.cc	(working copy)
@@ -12,9 +12,9 @@ 
 //#  error "<experimental/net>"
 //#endif
 
-//#if !__has_include(<experimental/any>)
-//#  error "<experimental/any>"
-//#endif
+#if !__has_include(<experimental/any>)
+#  error "<experimental/any>"
+#endif
 
 //#if !__has_include(<experimental/memory_resource>)
 //#  error "<experimental/memory_resource>"
Index: testsuite/experimental/feat-cxx14.cc
===================================================================
--- testsuite/experimental/feat-cxx14.cc	(revision 215788)
+++ testsuite/experimental/feat-cxx14.cc	(working copy)
@@ -78,11 +78,11 @@ 
 #  error "__cpp_lib_complex_udls != 201309"
 #endif
 
-#ifndef  __cpp_lib_generic_associative_lookup
-#  error "__cpp_lib_generic_associative_lookup"
-#elif  __cpp_lib_generic_associative_lookup != 201304
-#  error "__cpp_lib_generic_associative_lookup != 201304"
-#endif
+//#ifndef  __cpp_lib_generic_associative_lookup
+//#  error "__cpp_lib_generic_associative_lookup"
+//#elif  __cpp_lib_generic_associative_lookup != 201304
+//#  error "__cpp_lib_generic_associative_lookup != 201304"
+//#endif
 
 //#ifndef  __cpp_lib_null_iterators
 //#  error "__cpp_lib_null_iterators"
@@ -111,3 +111,9 @@ 
 #elif  __cpp_lib_shared_timed_mutex != 201402
 #  error "__cpp_lib_shared_timed_mutex != 201402"
 #endif
+
+#ifndef  __cpp_lib_is_final
+#  error "__cpp_lib_is_final"
+#elif  __cpp_lib_is_final != 201402
+#  error "__cpp_lib_is_final != 201402"
+#endif
Index: testsuite/20_util/declval/requirements/1_neg.cc
===================================================================
--- testsuite/20_util/declval/requirements/1_neg.cc	(revision 215788)
+++ testsuite/20_util/declval/requirements/1_neg.cc	(working copy)
@@ -19,7 +19,7 @@ 
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// { dg-error "static assertion failed" "" { target *-*-* } 2088 }
+// { dg-error "static assertion failed" "" { target *-*-* } 2099 }
 
 #include <utility>
 
Index: testsuite/20_util/duration/literals/range.cc
===================================================================
--- testsuite/20_util/duration/literals/range.cc	(revision 215788)
+++ testsuite/20_util/duration/literals/range.cc	(working copy)
@@ -27,5 +27,5 @@ 
 
   // std::numeric_limits<int64_t>::max() == 9223372036854775807;
   auto h = 9223372036854775808h;
-  // { dg-error "cannot be represented" "" { target *-*-* } 799 }
+  // { dg-error "cannot be represented" "" { target *-*-* } 796 }
 }
Index: testsuite/20_util/duration/requirements/typedefs_neg1.cc
===================================================================
--- testsuite/20_util/duration/requirements/typedefs_neg1.cc	(revision 215788)
+++ testsuite/20_util/duration/requirements/typedefs_neg1.cc	(working copy)
@@ -31,5 +31,5 @@ 
   test_type d;
 }
 
-// { dg-error "rep cannot be a duration" "" { target *-*-* } 249 }
+// { dg-error "rep cannot be a duration" "" { target *-*-* } 246 }
 // { dg-error "required from here" "" { target *-*-* } 31 }
Index: testsuite/20_util/duration/requirements/typedefs_neg2.cc
===================================================================
--- testsuite/20_util/duration/requirements/typedefs_neg2.cc	(revision 215788)
+++ testsuite/20_util/duration/requirements/typedefs_neg2.cc	(working copy)
@@ -32,5 +32,5 @@ 
   test_type d;			// { dg-error "required from here" }
 }
 
-// { dg-error "must be a specialization of ratio" "" { target *-*-* } 250 }
+// { dg-error "must be a specialization of ratio" "" { target *-*-* } 247 }
 // { dg-prune-output "not a member" }
Index: testsuite/20_util/duration/requirements/typedefs_neg3.cc
===================================================================
--- testsuite/20_util/duration/requirements/typedefs_neg3.cc	(revision 215788)
+++ testsuite/20_util/duration/requirements/typedefs_neg3.cc	(working copy)
@@ -33,5 +33,5 @@ 
   test_type d;
 }
 
-// { dg-error "period must be positive" "" { target *-*-* } 252 }
+// { dg-error "period must be positive" "" { target *-*-* } 249 }
 // { dg-error "required from here" "" { target *-*-* } 33 }
Index: testsuite/20_util/make_signed/requirements/typedefs_neg.cc
===================================================================
--- testsuite/20_util/make_signed/requirements/typedefs_neg.cc	(revision 215788)
+++ testsuite/20_util/make_signed/requirements/typedefs_neg.cc	(working copy)
@@ -48,5 +48,5 @@ 
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1753 }
-// { dg-error "declaration of" "" { target *-*-* } 1717 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1764 }
+// { dg-error "declaration of" "" { target *-*-* } 1728 }
Index: testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc
===================================================================
--- testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc	(revision 215788)
+++ testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc	(working copy)
@@ -48,5 +48,5 @@ 
 // { dg-error "required from here" "" { target *-*-* } 40 }
 // { dg-error "required from here" "" { target *-*-* } 42 }
 
-// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1656 }
-// { dg-error "declaration of" "" { target *-*-* } 1620 }
+// { dg-error "invalid use of incomplete type" "" { target *-*-* } 1667 }
+// { dg-error "declaration of" "" { target *-*-* } 1631 }
Index: testsuite/23_containers/array/tuple_interface/get_neg.cc
===================================================================
--- testsuite/23_containers/array/tuple_interface/get_neg.cc	(revision 215788)
+++ testsuite/23_containers/array/tuple_interface/get_neg.cc	(working copy)
@@ -28,6 +28,6 @@ 
 int n2 = std::get<1>(std::move(a));
 int n3 = std::get<1>(ca);
 
-// { dg-error "static assertion failed" "" { target *-*-* } 277 }
-// { dg-error "static assertion failed" "" { target *-*-* } 286 }
-// { dg-error "static assertion failed" "" { target *-*-* } 294 }
+// { dg-error "static assertion failed" "" { target *-*-* } 274 }
+// { dg-error "static assertion failed" "" { target *-*-* } 283 }
+// { dg-error "static assertion failed" "" { target *-*-* } 291 }
Index: testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
===================================================================
--- testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc	(revision 215788)
+++ testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc	(working copy)
@@ -23,4 +23,4 @@ 
 
 typedef std::tuple_element<1, std::array<int, 1>>::type type;
 
-// { dg-error "static assertion failed" "" { target *-*-* } 325 }
+// { dg-error "static assertion failed" "" { target *-*-* } 322 }