This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Detect non-member operator&() overloads in std::experimental::optional


On 12/11/14 00:16 +0000, Jonathan Wakely wrote:
The _Has_addressof trait only detected an overloaded operator&() as a
member function, this also checks for a non-member.

Also clean up the tests by removing some unused headers.

Tested x86_64-linux, committed to trunk.
commit df1baf34aaf4b6e9aaf7377cf9de41b092e4a284
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon Nov 10 19:02:02 2014 +0000

    	* testsuite/experimental/optional/constexpr/observers/1.cc: Remove
    	unused header.
    	* testsuite/experimental/optional/constexpr/observers/2.cc: Likewise.
    	* testsuite/experimental/optional/constexpr/observers/3.cc: Likewise.
    	* testsuite/experimental/optional/constexpr/observers/4.cc: Likewise.
    	* testsuite/experimental/optional/constexpr/observers/5.cc: Likewise.

diff --git a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/1.cc b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/1.cc
index d7aeadf..9e8a91e 100644
--- a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/1.cc
+++ b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/1.cc
@@ -19,7 +19,6 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <experimental/optional>
-#include <testsuite_hooks.h>
 
 struct value_type
 {
diff --git a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/2.cc b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/2.cc
index 2c9215c..b10ffcd 100644
--- a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/2.cc
+++ b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/2.cc
@@ -21,7 +21,6 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <experimental/optional>
-#include <testsuite_hooks.h>
 
 struct value_type
 {
diff --git a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/3.cc b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/3.cc
index 49406bf..66e7e27 100644
--- a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/3.cc
+++ b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/3.cc
@@ -21,7 +21,6 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <experimental/optional>
-#include <testsuite_hooks.h>
 
 struct value_type
 {
diff --git a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/4.cc b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/4.cc
index c7cfc03..d88e94d 100644
--- a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/4.cc
+++ b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/4.cc
@@ -19,7 +19,6 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <experimental/optional>
-#include <testsuite_hooks.h>
 
 struct value_type
 {
diff --git a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/5.cc b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/5.cc
index 6dfd068..1e95ed0 100644
--- a/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/5.cc
+++ b/libstdc++-v3/testsuite/experimental/optional/constexpr/observers/5.cc
@@ -19,7 +19,6 @@
 // <http://www.gnu.org/licenses/>.
 
 #include <experimental/optional>
-#include <testsuite_hooks.h>
 
 struct value_type
 {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]