Documented pointer_traits according to Trac #10853 proposal

This commit is contained in:
Ion Gaztañaga
2014-12-15 17:39:04 +01:00
parent a4f0c0c7b3
commit 50f9f57f6c
2 changed files with 11 additions and 1 deletions

View File

@@ -3763,7 +3763,9 @@ to be inserted in intrusive containers are allocated using `std::vector` or `std
[section:release_notes_boost_1_58_00 Boost 1.58 Release]
* Reduced compile-time dependencies, headers, and the use of Boost.Preprocessor, specially for hooks and iterators.
* Reduced compile-time dependencies, headers, and the use of Boost.Preprocessor, specially for hooks and iterators.
* Fixed bugs:
* [@https://svn.boost.org/trac/boost/ticket/10853 Boost Trac #10853: ['problem with detection of const_cast_from]]
[endsect]

View File

@@ -57,6 +57,14 @@ BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_traits_ptr)
//! extensions like castings.
//!
//! pointer_traits supplies a uniform interface to certain attributes of pointer-like types.
//!
//! <b>Note</b>: When defining a custom family of pointers or references to be used with BI
//! library, make sure the public static conversion functions accessed through
//! the `pointer_traits` interface (`*_cast_from` and `pointer_to`) can
//! properly convert between const and nonconst referred member types
//! <b>without the use of implicit constructor calls</b>. It is suggested these
//! conversions be implemented as function templates, where the template
//! argument is the type of the object being converted from.
template <typename Ptr>
struct pointer_traits
{