Commit c8bf5b7c by Paolo Carlini Committed by Paolo Carlini

tuple_iterate.h (tuple_size<tuple<> >::value): Provide definition.

2006-10-30  Paolo Carlini  <pcarlini@suse.de>

	* include/tr1/tuple_iterate.h (tuple_size<tuple<> >::value): Provide
	definition.
	* include/tr1/functional (is_bind_expression<>::value,
	is_placeholder<>::value, + various partial specializations): Likewise.
	* include/tr1/array (tuple_size<array<> >::value): Likewise.

From-SVN: r118203
parent 771e6d83
2006-10-30 Paolo Carlini <pcarlini@suse.de> 2006-10-30 Paolo Carlini <pcarlini@suse.de>
* include/tr1/tuple_iterate.h (tuple_size<tuple<> >::value): Provide
definition.
* include/tr1/functional (is_bind_expression<>::value,
is_placeholder<>::value, + various partial specializations): Likewise.
* include/tr1/array (tuple_size<array<> >::value): Likewise.
2006-10-30 Paolo Carlini <pcarlini@suse.de>
* testsuite/tr1/6_containers/array/capacity/max_size.cc: Actually * testsuite/tr1/6_containers/array/capacity/max_size.cc: Actually
do test max_size(). do test max_size().
......
...@@ -243,6 +243,9 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -243,6 +243,9 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
struct tuple_size<array<_Tp, _Nm> > struct tuple_size<array<_Tp, _Nm> >
{ static const int value = _Nm; }; { static const int value = _Nm; };
template<typename _Tp, std::size_t _Nm>
const int tuple_size<array<_Tp, _Nm> >::value;
template<int _Int, typename _Tp, std::size_t _Nm> template<int _Int, typename _Tp, std::size_t _Nm>
struct tuple_element<_Int, array<_Tp, _Nm> > struct tuple_element<_Int, array<_Tp, _Nm> >
{ typedef _Tp type; }; { typedef _Tp type; };
......
...@@ -514,9 +514,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -514,9 +514,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
*/ */
template<typename _Tp> template<typename _Tp>
struct is_bind_expression struct is_bind_expression
{ { static const bool value = false; };
static const bool value = false;
}; template<typename _Tp>
const bool is_bind_expression<_Tp>::value;
/** /**
* @brief Determines if the given type _Tp is a placeholder in a * @brief Determines if the given type _Tp is a placeholder in a
...@@ -524,9 +525,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -524,9 +525,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
*/ */
template<typename _Tp> template<typename _Tp>
struct is_placeholder struct is_placeholder
{ { static const int value = 0; };
static const int value = 0;
}; template<typename _Tp>
const int is_placeholder<_Tp>::value;
/** /**
* @if maint * @if maint
...@@ -543,9 +545,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -543,9 +545,10 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
*/ */
template<int _Num> template<int _Num>
struct is_placeholder<_Placeholder<_Num> > struct is_placeholder<_Placeholder<_Num> >
{ { static const int value = _Num; };
static const int value = _Num;
}; template<int _Num>
const int is_placeholder<_Placeholder<_Num> >::value;
/** /**
* @if maint * @if maint
...@@ -714,10 +717,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -714,10 +717,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
* @endif * @endif
*/ */
template<typename _Signature> template<typename _Signature>
struct is_bind_expression<_Bind<_Signature> > struct is_bind_expression<_Bind<_Signature> >
{ { static const bool value = true; };
static const bool value = true;
}; template<typename _Signature>
const bool is_bind_expression<_Bind<_Signature> >::value;
/** /**
* @if maint * @if maint
...@@ -725,10 +729,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -725,10 +729,11 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
* @endif * @endif
*/ */
template<typename _Result, typename _Signature> template<typename _Result, typename _Signature>
struct is_bind_expression<_Bind_result<_Result, _Signature> > struct is_bind_expression<_Bind_result<_Result, _Signature> >
{ { static const bool value = true; };
static const bool value = true;
}; template<typename _Result, typename _Signature>
const bool is_bind_expression<_Bind_result<_Result, _Signature> >::value;
/** /**
* @brief Exception class thrown when class template function's * @brief Exception class thrown when class template function's
......
// class template tuple -*- C++ -*- // class template tuple -*- C++ -*-
// Copyright (C) 2004, 2005 Free Software Foundation, Inc. // Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the // software; you can redistribute it and/or modify it under the
...@@ -39,6 +39,11 @@ template<_GLIBCXX_TEMPLATE_PARAMS> ...@@ -39,6 +39,11 @@ template<_GLIBCXX_TEMPLATE_PARAMS>
struct tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> > struct tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >
{ static const int value = _GLIBCXX_NUM_ARGS; }; { static const int value = _GLIBCXX_NUM_ARGS; };
#if _GLIBCXX_NUM_ARGS > 0
template<_GLIBCXX_TEMPLATE_PARAMS>
const int tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >::value;
#endif
template<_GLIBCXX_TEMPLATE_PARAMS> template<_GLIBCXX_TEMPLATE_PARAMS>
#ifdef _GLIBCXX_LAST_INCLUDE #ifdef _GLIBCXX_LAST_INCLUDE
class tuple class tuple
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment