Changed alignof to etl::alignment_of

This commit is contained in:
John Wellbelove 2017-12-22 11:12:12 +00:00
parent dbd07f53dd
commit 87317df69a
2 changed files with 2 additions and 2 deletions

View File

@ -1,5 +1,5 @@
name=Embedded Template Library
version=10.8.0
version=10.8.1
author= John Wellbelove <john.wellbelove@etlcpp.com>
maintainer=John Wellbelove <john.wellbelove@etlcpp.com>
sentence=A C++ template library tailored for embedded systems.

View File

@ -407,7 +407,7 @@ namespace etl
template <typename U>
U* allocate()
{
STATIC_ASSERT(alignof(U) <= ALIGNMENT_, "Type has incompatible alignment");
STATIC_ASSERT(etl::alignment_of<U>::value <= ALIGNMENT_, "Type has incompatible alignment");
STATIC_ASSERT(sizeof(U) <= ELEMENT_SIZE, "Type too large for pool");
return ipool::allocate<U>();
}