From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9611 invoked by alias); 22 May 2011 12:46:54 -0000 Received: (qmail 9600 invoked by uid 22791); 22 May 2011 12:46:54 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 22 May 2011 12:46:40 +0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49107] [C++0x] incomplete type regression with std::pair X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Component Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Sun, 22 May 2011 13:23:00 -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 X-SW-Source: 2011-05/txt/msg01921.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49107 Paolo Carlini changed: What |Removed |Added ---------------------------------------------------------------------------- Component|libstdc++ |c++ --- Comment #4 from Paolo Carlini 2011-05-22 12:28:51 UTC --- Thanks Marc. Well, now I would say it's a C++ front-end issue. Consider the below: uncomment the seemingly unrelated VectorH3 constructor from const Line_3&, and doesn't compile anymore. //////////////// #include template inline void swap(_Tp& __a, _Tp& __b) noexcept(std::is_nothrow_move_constructible<_Tp>::value) ; template struct pair { _T1 first; void swap(pair& __p) noexcept(noexcept(swap(first, __p.first))); }; template < class R_ > struct VectorH3 { typedef typename R_::RT RT; typedef typename R_::Ray_3 Ray_3; typedef typename R_::Line_3 Line_3; VectorH3() {} VectorH3(const Ray_3& r) ; // VectorH3(const Line_3& l) ; VectorH3(const RT& x, const RT& y, const RT& z, const RT& w) ; }; template < class R_ > class RayH3 { typedef typename R_::Vector_3 Vector_3; typedef pair Rep; Rep base; }; template < class R_ > struct LineC3 { typedef typename R_::Vector_3 Vector_3; typedef pair Rep; Rep base; }; struct Kernel { typedef double RT; typedef VectorH3 Vector_3; typedef LineC3 Line_3; typedef RayH3 Ray_3; struct Construct_vector_3 { Vector_3 operator()(const RT& x, const RT& y, const RT& z, const RT& w) const { return Vector_3(x, y, z, w); } }; }; int main() { Kernel::Construct_vector_3()( 8, 2, 4, 1); }