summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-09 10:28:56 +0000
committerredi <redi@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-09 10:28:56 +0000
commit4ba0945fbff12d248826a9d4247194c964fb3586 (patch)
tree64f1a87a65f5830fb2b3435697e1e5615106f465 /libstdc++-v3
parent48570de53a5174e6fab8b7be01271b57e8fcc073 (diff)
downloadgcc-4ba0945fbff12d248826a9d4247194c964fb3586.tar.gz
2011-07-09 Jonathan Wakely <jwakely.gcc@gmail.com>
* include/ext/cast.h: Fix typo in include guard. * include/ext/pointer.h (_Unqualified_type): Remove redundant partial specializations for volatile types. Fix typos in comments. (pointer_traits<_Pointer_adaptor<Tp>>::pointer_to): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176075 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog7
-rw-r--r--libstdc++-v3/include/ext/cast.h2
-rw-r--r--libstdc++-v3/include/ext/pointer.h21
3 files changed, 16 insertions, 14 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 663683f4a6b..9d8de563338 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,12 @@
2011-07-09 Jonathan Wakely <jwakely.gcc@gmail.com>
+ * include/ext/cast.h: Fix typo in include guard.
+ * include/ext/pointer.h (_Unqualified_type): Remove redundant
+ partial specializations for volatile types. Fix typos in comments.
+ (pointer_traits<_Pointer_adaptor<Tp>>::pointer_to): Define.
+
+2011-07-09 Jonathan Wakely <jwakely.gcc@gmail.com>
+
PR libstdc++/49668
* include/std/functional (__bind_simple): Define.
* include/std/future (_Task_setter): Parameterize by type of result
diff --git a/libstdc++-v3/include/ext/cast.h b/libstdc++-v3/include/ext/cast.h
index f3384f9a596..de6faab39c1 100644
--- a/libstdc++-v3/include/ext/cast.h
+++ b/libstdc++-v3/include/ext/cast.h
@@ -118,4 +118,4 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace
-#endif // __GLIBCXX_CAST_H
+#endif // _GLIBCXX_CAST_H
diff --git a/libstdc++-v3/include/ext/pointer.h b/libstdc++-v3/include/ext/pointer.h
index 2dc1c398d1c..9877e14d3c4 100644
--- a/libstdc++-v3/include/ext/pointer.h
+++ b/libstdc++-v3/include/ext/pointer.h
@@ -232,7 +232,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ typedef const volatile _Invalid_type& reference; };
/**
- * This structure accomodates the way in which
+ * This structure accommodates the way in which
* std::iterator_traits<> is normally specialized for const T*, so
* that value_type is still T.
*/
@@ -244,14 +244,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct _Unqualified_type<const _Tp>
{ typedef _Tp type; };
- template<typename _Tp>
- struct _Unqualified_type<volatile _Tp>
- { typedef volatile _Tp type; };
-
- template<typename _Tp>
- struct _Unqualified_type<volatile const _Tp>
- { typedef volatile _Tp type; };
-
/**
* The following provides an 'alternative pointer' that works with
* the containers when specified as the pointer typedef of the
@@ -266,7 +258,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* so that it becomes reusable for creating other pointer types.
*
* A key point of this class is also that it allows container
- * writers to 'assume' Alocator::pointer is a typedef for a normal
+ * writers to 'assume' Allocator::pointer is a typedef for a normal
* pointer. This class supports most of the conventions of a true
* pointer, and can, for instance handle implicit conversion to
* const and base class pointer types. The only impositions on
@@ -274,7 +266,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* Allocator::pointer typedef appropriately for pointer types. 2)
* if you need pointer casting, use the __pointer_cast<> functions
* from ext/cast.h. This allows pointer cast operations to be
- * overloaded is necessary by custom pointers.
+ * overloaded as necessary by custom pointers.
*
* Note: The const qualifier works with this pointer adapter as
* follows:
@@ -437,7 +429,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} \
// END of _CXX_POINTER_ARITH_OPERATOR_SET macro
- // Expand into the various pointer arithmatic operators needed.
+ // Expand into the various pointer arithmetic operators needed.
_CXX_POINTER_ARITH_OPERATOR_SET(short);
_CXX_POINTER_ARITH_OPERATOR_SET(unsigned short);
_CXX_POINTER_ARITH_OPERATOR_SET(int);
@@ -528,7 +520,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return __rhs.get() != reinterpret_cast<void*>(__lhs); }
/**
- * Comparison operators for _Pointer_adapter defer to the base class'es
+ * Comparison operators for _Pointer_adapter defer to the base class'
* comparison operators, when possible.
*/
template<typename _Tp>
@@ -600,6 +592,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
typedef typename __gnu_cxx::_Pointer_adapter<_Rebound_policy> __type;
};
+
+ static pointer pointer_to(typename pointer::reference __r) noexcept
+ { return pointer(std::addressof(__r)); }
};
_GLIBCXX_END_NAMESPACE_VERSION