This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [v3 PATCH] PR libstdc++/77288 and the newest proposed resolution for LWG 2756


On 22 September 2016 at 11:55, Christophe Lyon
<christophe.lyon@linaro.org> wrote:
> The new test 77288.cc fails on old arm targets (armv5t):
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:
> In function 'void test01()':
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:31:
> error: 'exception_ptr' is not a member of 'std'
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:31:
> error: template argument 1 is invalid
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:31:
> error: template argument 1 is invalid
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:32:
> error: 'exception_ptr' is not a member of 'std'
> /aci-gcc-fsf/sources/gcc-fsf/gccsrc/libstdc++-v3/testsuite/20_util/optional/77288.cc:32:
> error: template argument 1 is invalid


Does the attached patch fix the problem?
diff --git a/libstdc++-v3/testsuite/20_util/optional/77288.cc b/libstdc++-v3/testsuite/20_util/optional/77288.cc
index eafafb7..0df74a9 100644
--- a/libstdc++-v3/testsuite/20_util/optional/77288.cc
+++ b/libstdc++-v3/testsuite/20_util/optional/77288.cc
@@ -18,7 +18,6 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-#include <exception>
 #include <optional>
 #include <any>
 
@@ -28,8 +27,8 @@ using std::optional;
 
 void test01()
 {
-    optional<optional<std::exception_ptr>> nested_element;
-    optional<std::exception_ptr> element = {};
+    optional<optional<int>> nested_element;
+    optional<int> element = {};
     nested_element = element;
     VERIFY(nested_element);
 }

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