From 35727928ad291d62f08d01821556cd33bfa12191 Mon Sep 17 00:00:00 2001 From: Lingzhu Xiang Date: Wed, 23 Feb 2022 07:41:56 +0800 Subject: [PATCH] Fix test macro conflicts with STL headers in C++20 --- test/main.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/main.h b/test/main.h index 0e341372e..b1c09c766 100644 --- a/test/main.h +++ b/test/main.h @@ -53,6 +53,13 @@ #include #endif #endif +#if __cplusplus > 201703L +// libstdc++ 9's indirectly uses max() via . +// libstdc++ 10's indirectly uses max() via ranges headers. +#include +// libstdc++ 11's indirectly uses max() via semaphore headers. +#include +#endif // Configure GPU. #if defined(EIGEN_USE_HIP)