浏览代码

math: make sure PTRDIFF_MAX and INT_MAX are defined before using them.

undefined
Sam Hocevar 9 年前
父节点
当前提交
bfe91c1098
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. +6
    -1
      src/lol/math/arraynd.h

+ 6
- 1
src/lol/math/arraynd.h 查看文件

@@ -26,12 +26,13 @@
#include <lol/base/array.h>
#include <lol/base/assert.h>

#include <cstddef>
#include <climits>
#include <type_traits>

namespace lol
{


template<typename T, ptrdiff_t L>
class arraynd_initializer
{
@@ -275,5 +276,9 @@ private:
template<typename... T> using array2d = arraynd<2, T...>;
template<typename... T> using array3d = arraynd<3, T...>;

/* Make sure these macros exist since we use them in preprocessor tests. */
static_assert(PTRDIFF_MAX > 0, "missing PTRDIFF_MAX");
static_assert(INT_MAX > 0, "missing INT_MAX");

} /* namespace lol */


正在加载...
取消
保存