aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r--libstdc++-v3/include/tr1/functional10
-rw-r--r--libstdc++-v3/include/tr1/tuple_iterate.h23
2 files changed, 21 insertions, 12 deletions
diff --git a/libstdc++-v3/include/tr1/functional b/libstdc++-v3/include/tr1/functional
index 6b197d83700..76eb87a0bb5 100644
--- a/libstdc++-v3/include/tr1/functional
+++ b/libstdc++-v3/include/tr1/functional
@@ -372,22 +372,24 @@ namespace tr1
// Denotes a reference should be taken to a variable.
template<typename _Tp>
- reference_wrapper<_Tp>
+ inline reference_wrapper<_Tp>
ref(_Tp& __t)
{ return reference_wrapper<_Tp>(__t); }
// Denotes a const reference should be taken to a variable.
template<typename _Tp>
- reference_wrapper<const _Tp>
+ inline reference_wrapper<const _Tp>
cref(const _Tp& __t)
{ return reference_wrapper<const _Tp>(__t); }
template<typename _Tp>
- reference_wrapper<_Tp> ref(reference_wrapper<_Tp> __t)
+ inline reference_wrapper<_Tp>
+ ref(reference_wrapper<_Tp> __t)
{ return ref(__t.get()); }
template<typename _Tp>
- reference_wrapper<const _Tp> cref(reference_wrapper<_Tp> __t)
+ inline reference_wrapper<const _Tp>
+ cref(reference_wrapper<_Tp> __t)
{ return cref(__t.get()); }
template<typename _Tp, bool>
diff --git a/libstdc++-v3/include/tr1/tuple_iterate.h b/libstdc++-v3/include/tr1/tuple_iterate.h
index dbfa42b7491..2bf7d3e22d5 100644
--- a/libstdc++-v3/include/tr1/tuple_iterate.h
+++ b/libstdc++-v3/include/tr1/tuple_iterate.h
@@ -53,11 +53,18 @@ template<_GLIBCXX_TEMPLATE_PARAMS>
{ }
#if _GLIBCXX_NUM_ARGS == 2
-template<class _U1, class _U2>
- tuple(const std::pair<_U1, _U2>& __u):
- _M_arg1(__u.first), _M_arg2(__u.second)
- { }
+ template<typename _U1, typename _U2>
+ tuple(const std::pair<_U1, _U2>& __u) :
+ _M_arg1(__u.first), _M_arg2(__u.second)
+ { }
+ template<typename _U1, typename _U2>
+ tuple&
+ operator=(const std::pair<_U1, _U2>& __u)
+ {
+ _M_arg1 = __u.first;
+ _M_arg2 = __u.second;
+ }
#endif
#if _GLIBCXX_NUM_ARGS > 0
@@ -137,14 +144,14 @@ tuple<>
inline make_tuple()
{ return tuple<>(); }
-inline tuple<>
-tie()
+tuple<>
+inline tie()
{ return tuple<>(); }
#else
template<_GLIBCXX_TEMPLATE_PARAMS>
typename __stripped_tuple_type<_GLIBCXX_TEMPLATE_ARGS>::__type
- make_tuple(_GLIBCXX_PARAMS)
+ inline make_tuple(_GLIBCXX_PARAMS)
{
return typename __stripped_tuple_type<_GLIBCXX_TEMPLATE_ARGS>::
__type(_GLIBCXX_ARGS);
@@ -152,7 +159,7 @@ template<_GLIBCXX_TEMPLATE_PARAMS>
template<_GLIBCXX_TEMPLATE_PARAMS>
tuple<_GLIBCXX_REF_TEMPLATE_ARGS>
- tie(_GLIBCXX_REF_PARAMS)
+ inline tie(_GLIBCXX_REF_PARAMS)
{ return make_tuple(_GLIBCXX_REF_WRAP_PARAMS); }
#endif