[GIT] ppl/ppl(master): Better documentation for the two Row_Impl::Impl:: operator delete(...).

Module: ppl/ppl Branch: master Commit: 039e6ba85aa460c8b0fc723ee6ed344dad2db8bb URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=039e6ba85aa46...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Thu Apr 8 15:57:50 2010 +0200
Better documentation for the two Row_Impl::Impl::operator delete(...).
---
src/Row.defs.hh | 31 +++++++++++++++++++++++-------- 1 files changed, 23 insertions(+), 8 deletions(-)
diff --git a/src/Row.defs.hh b/src/Row.defs.hh index 0f1ef26..f1b147c 100644 --- a/src/Row.defs.hh +++ b/src/Row.defs.hh @@ -390,19 +390,34 @@ public: //! \name Custom allocator and deallocator //@{
- /*! \brief - Allocates a chunk of memory able to contain \p capacity Coefficient objects - beyond the specified \p fixed_size and returns a pointer to the new - allocated memory. + //! Placement allocation function. + /*! + Allocates a chunk of memory able to contain \p capacity Coefficient + objects beyond the specified \p fixed_size and returns a pointer to + the newly allocated memory. */ static void* operator new(size_t fixed_size, dimension_type capacity);
- //! Uses the standard delete operator to free the memory \p p points to. + //! Usual (non-placement) deallocation function. + /*! + Uses the standard delete operator to free the memory \p p points to. + + \note + The definition of this custom deallocation function is required + since otherwise the placement deallocation function + <code> + static void operator delete(void* p, dimension_type capacity); + </code> + would be wrongly interpreted as a usual (non-placement) deallocation + function (see C++98 3.7.3.2p2). This happens because \c dimension_type + is just an alias for \c std::size_t. + See also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42115 + */ static void operator delete(void* p);
- /*! \brief - Placement version: - uses the standard operator delete to free the memory \p p points to. + //! Placement deallocation function. + /*! + Uses the standard operator delete to free the memory \p p points to. */ static void operator delete(void* p, dimension_type capacity); //@} // Custom allocator and deallocator
participants (1)
-
Enea Zaffanella