Skip to content

Commit

Permalink
Fixed issue ned14#14 where nedalloc was using is_pod<> instead of is_…
Browse files Browse the repository at this point in the history
…trivially_copyable<>.Thanks to JustSid for reporting this.
  • Loading branch information
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) committed Oct 10, 2013
1 parent 7f0e265 commit e56abaf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
7 changes: 6 additions & 1 deletion Readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -461,9 +461,14 @@ <h3>v1.10 beta 4 ?:</h3>
<li><span class="gitcommit">[master a6a0dec]</span> Fixed issue #10 where
a failure to allocate memory on POSIX was not being trapped correctly. Thanks
to btaudul for reporting this.</li>
<li><span class="gitcommit">[master xxxxxxx]</span> Fixed issue #12 where
<li><span class="gitcommit">[master a559f9e]</span> Fixed issue #12 where
RTLD_DEFAULT was undefined. Replaced this code entirely with new code which
parses /proc/meminfo for huge page size. Thanks to Geri for reporting this.</li>
<li><span class="gitcommit">[master 9119158]</span> Added Travis CI build bot
support to nedalloc, testing gcc, clang and clang static analyser.</li>
<li><span class="gitcommit">[master xxxxxxx]</span> Fixed issue #14 where
nedalloc was using is_pod&lt;&gt; instead of is_trivially_copyable&lt;&gt;.
Thanks to JustSid for reporting this.</li>
</ul>
<h3>v1.10 beta 3 17th July 2012:</h3>
<ul>
Expand Down
11 changes: 4 additions & 7 deletions nedmalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -986,10 +986,10 @@ policies...
{
throw std::bad_alloc();
}
//! \brief Specifies if the type is POD. Is std::is_pod<T>::value on C++0x compilers, otherwise false.
//! \brief Specifies if the type is POD. Is std::is_trivially_copyable<T>::value on C++0x compilers, otherwise false.
static const bool policy_typeIsPOD=
#ifdef HAVE_CPP0XTYPETRAITS
is_pod<T>::value;
is_trivially_copyable<T>::value;
#else
false;
#endif
Expand Down Expand Up @@ -1215,11 +1215,8 @@ namespace nedpolicy
\ingroup C++
\brief A policy forcing the treatment of the type as Plain Old Data (POD)
On C++0x compilers, the &lt;type_traits&gt; is_pod<type>::value is used by default.
However, for earlier compilers and for types where is_pod<>::value returns false
even though the type actually is POD (for example, if you declare a
constructor you lose PODness even if the data contents are still POD), you can
force PODness one way or another. When treated as POD, memcpy() is used instead
On C++0x compilers, the &lt;type_traits&gt; is_trivially_copyable<type>::value is used by default.
When treated as POD, memcpy() is used instead
of copy construction and realloc() is permitted to move the memory contents when
resizing.
*/
Expand Down

0 comments on commit e56abaf

Please sign in to comment.