[Bug libstdc++/49107] [C++0x] incomplete type regression with std::pair
marc.glisse at normalesup dot org
gcc-bugzilla@gcc.gnu.org
Sun May 22 12:44:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49107
--- Comment #3 from Marc Glisse <marc.glisse at normalesup dot org> 2011-05-22 12:12:50 UTC ---
(In reply to comment #1)
> I think since std::pair started using noexcept and therefore is_constructible &
> co. Frankly doesn't look to me like a library-proper issue, I'm adding Daniel
> and Jason in CC... If you could reduce it a bit more, it would be great.
Slightly reduced below. I hope noexcept doesn't have the same issues as the
concept checking mode of the library...
#include <type_traits>
namespace std
{
template<typename _Tp>
inline void
swap(_Tp& __a, _Tp& __b)
noexcept(is_nothrow_move_constructible<_Tp>::value
&& is_nothrow_move_assignable<_Tp>::value) ;
template<class _T1, class _T2>
struct pair
{
_T1 first;
_T2 second;
void
swap(pair& __p)
noexcept(noexcept(swap(first, __p.first))
&& noexcept(swap(second, __p.second))) ;
};
}
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_::Point_3 Point_3;
typedef typename R_::Vector_3 Vector_3;
typedef std::pair<Point_3, Vector_3> Rep;
Rep base;
};
template < class R_ >
struct LineC3
{
typedef typename R_::Point_3 Point_3;
typedef typename R_::Vector_3 Vector_3;
typedef std::pair<Point_3, Vector_3> Rep;
Rep base;
};
struct Kernel
{
typedef double RT;
struct Point_3{};
typedef VectorH3<Kernel> Vector_3;
typedef LineC3<Kernel> Line_3;
typedef RayH3<Kernel> 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);
}
More information about the Gcc-bugs
mailing list