chore(util/*): add cstddef header before including gmp.h/mpfr.h
Reference: https://gcc.gnu.org/gcc-4.9/porting_to.html ------ Header <cstddef> changes The <cstddef> header was updated for C++11 support and this breaks some libraries which misuse macros meant for internal use by GCC only. For instance with GMP versions up to 5.1.3, you may see: /usr/include/c++/4.9.0/cstddef:51:11: error: ‘::max_align_t’ has not been declared using ::max_align_t; ^ Another possible error is: someheader.h:99:13: error: ‘ptrdiff_t’ does not name a type A workaround until libraries get updated is to include <cstddef> or <stddef.h> before any headers from that library.
This commit is contained in:
parent
4350382b90
commit
39645390ff
6 changed files with 6 additions and 0 deletions
|
@ -6,6 +6,7 @@ Author: Leonardo de Moura
|
|||
Soonho Kong
|
||||
*/
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <gmp.h>
|
||||
#include <mpfr.h>
|
||||
#include <utility>
|
||||
|
|
|
@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Author: Soonho Kong
|
||||
*/
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <mpfr.h>
|
||||
#include "util/numerics/mpfp.h"
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Author: Soonho Kong
|
||||
*/
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <mpfr.h>
|
||||
#include "util/numerics/mpfp.h"
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
|
||||
Author: Leonardo de Moura
|
||||
*/
|
||||
#include <cstddef>
|
||||
#include <gmp.h>
|
||||
#include "util/memory.h"
|
||||
#include "util/numerics/mpz.h"
|
||||
|
|
|
@ -6,6 +6,7 @@ Author: Soonho Kong
|
|||
*/
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <cstddef>
|
||||
#include <mpfr.h>
|
||||
#include "util/numerics/mpz.h"
|
||||
#include "util/numerics/mpq.h"
|
||||
|
|
|
@ -5,6 +5,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Author: Leonardo de Moura
|
||||
*/
|
||||
#pragma once
|
||||
#include <cstddef>
|
||||
#include <gmp.h>
|
||||
#include <iostream>
|
||||
#include "util/debug.h"
|
||||
|
|
Loading…
Reference in a new issue