From 3f4684f87da4303063a194c7340f1485d1752ae0 Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Tue, 26 Jan 2021 13:39:34 -0800 Subject: Include `` in one place, remove custom typedefs Originating from [this SO issue](https://stackoverflow.com/questions/65901014/how-to-solve-this-all-error-2-in-this-case), some win32 compilers define `__int32` as a `long`, but MinGW defines `std::int32_t` as an `int`, leading to a type conflict. To avoid this, we remove the custom `typedef` definitions for win32. The Tensor module requires C++11 anyways, so we are guaranteed to have included `` already in `Eigen/Core`. Also re-arranged the headers to only include `` in one place to avoid this type of error again. --- unsupported/Eigen/CXX11/Tensor | 12 ------------ unsupported/Eigen/CXX11/ThreadPool | 1 - 2 files changed, 13 deletions(-) (limited to 'unsupported') diff --git a/unsupported/Eigen/CXX11/Tensor b/unsupported/Eigen/CXX11/Tensor index beed2308a..d73c6008d 100644 --- a/unsupported/Eigen/CXX11/Tensor +++ b/unsupported/Eigen/CXX11/Tensor @@ -41,18 +41,6 @@ #include #include -#ifdef _WIN32 -typedef __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#include -#else -#include -#endif - #ifdef _WIN32 #include #elif defined(__APPLE__) diff --git a/unsupported/Eigen/CXX11/ThreadPool b/unsupported/Eigen/CXX11/ThreadPool index 71a6afe39..5f59e9714 100644 --- a/unsupported/Eigen/CXX11/ThreadPool +++ b/unsupported/Eigen/CXX11/ThreadPool @@ -33,7 +33,6 @@ #if __cplusplus > 199711L || EIGEN_COMP_MSVC >= 1900 #include #include -#include #include #include -- cgit v1.2.3