From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24771 invoked by alias); 17 Jan 2015 22:41:16 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 24752 invoked by uid 48); 17 Jan 2015 22:41:11 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/64650] New: std::experimental::bad_optional_access is not default constructible Date: Sat, 17 Jan 2015 22:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.9.3 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01676.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D64650 Bug ID: 64650 Summary: std::experimental::bad_optional_access is not default constructible Product: gcc Version: 4.9.3 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org This should compile using -std=3Dc++14: #include std::experimental::bad_optional_access e; badopt.cc:3:40: error: no matching function for call to =E2=80=98std::experimental::fundamentals_v1::bad_optional_access::bad_optio= nal_access()=E2=80=99 std::experimental::bad_optional_access e; ^ >>From gcc-bugs-return-473684-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Jan 17 23:02:52 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 5574 invoked by alias); 17 Jan 2015 23:02:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 5540 invoked by uid 48); 17 Jan 2015 23:02:45 -0000 From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/64651] New: std::rethrow_exception not found by ADL Date: Sat, 17 Jan 2015 23:02:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.9.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg01678.txt.bz2 Content-length: 1164 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64651 Bug ID: 64651 Summary: std::rethrow_exception not found by ADL Product: gcc Version: 4.9.3 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org This fails (using -std=c++11): #include int main() { std::exception_ptr e; rethrow_exception(e); } The standard declares: typedef _unspecified_ exception_ptr; [[noreturn]] void rethrow_exception(exception_ptr p); So it's conforming for exception_ptr to be a typedef for a type in a different namespace, and in that case ADL won't find std::rethrow_exception, but it's not very helpful to users for it to fail. This makes it work as expected: --- a/libstdc++-v3/libsupc++/exception_ptr.h +++ b/libstdc++-v3/libsupc++/exception_ptr.h @@ -68,6 +68,8 @@ namespace std namespace __exception_ptr { + using std::rethrow_exception; + /** * @brief An opaque pointer to an arbitrary exception. * @ingroup exceptions