Skip to content

Commit

Permalink
Conditionally remove static_assert in align.hpp
Browse files Browse the repository at this point in the history
This supports compilers with missing constexpr support like Visual Studio 12.
  • Loading branch information
foonathan committed Nov 1, 2015
1 parent ddb7d83 commit 124fdca
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/foonathan/memory/detail/align.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ namespace foonathan { namespace memory

// maximum alignment value
FOONATHAN_CONSTEXPR std::size_t max_alignment = FOONATHAN_ALIGNOF(foonathan_memory_comp::max_align_t);
#if FOONATHAN_HAS_CONSTEXPR
static_assert(is_valid_alignment(max_alignment), "ehm..?");
#endif

// returns the minimum alignment required for a node of given size
inline std::size_t alignment_for(std::size_t size) FOONATHAN_NOEXCEPT
Expand Down

0 comments on commit 124fdca

Please sign in to comment.