kendryte / kendryte-standalone-sdk

Standalone SDK for kendryte K210
https://kendryte.com
Apache License 2.0
440 stars 161 forks source link

min/max macros makes most c++ containers useless #117

Open duncmac16 opened 3 years ago

duncmac16 commented 3 years ago

Make sure you read and understand this document. Use one of the two templates below and delete the rest.


BUG REPORT I am trying to use the Arduino framework that relies on the standalone sdk and came across the min/max macros. These two macros make most C++ containers useless as they no longer compile correctly. The container classes use the std::numeric_limits::max() function, hence the compiler target no longer makes sense.

Expected behaviour

There should be no lower-case min or max macro's. Only inline functions.

Actual behavior

Test code

Provide a Minimal, Complete, and Verifiable example which will reproduce the problem.

#include <array>

int main() {
   std::array<int, 1> a;
}

Hardware

Sipeed Maixduino

System

MacOS