Skip to main content
Stepan Martinek
Associate II
January 4, 2022
Solved

#include fails on 9-2020-q2-update [SOLVED]

  • January 4, 2022
  • 2 replies
  • 1136 views

There's a bug in <numeric> library in 9-2020-q2-update toolchain. It makes the project fail to compile just by adding `#include <numeric>` to it. I also tried making a fresh new empty project with only that library included and it also doesn't compile. New toolchain 10.3.1 doesn't seem to fail on that.

c:\st\stm32cubeide\plugins\...\include\c++\9.3.1\numeric:89:10: error: expected ')' before '__val'
 89 | (_Tp __val)
 | ~ ^~~~~~
 | )

This topic has been closed for replies.
Best answer by Stepan Martinek

I have figured it out. For some unknown reason I was missing `__abs_integral` in front of `(_Tp __val)` on line 89 of the file c++/9.3.1/numeric. It's OK now.

2 replies

TDK
January 4, 2022

I can't reproduce here. Compiles fine, no warning or error messages. Same 9-2020-q2-update toolchain.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Stepan Martinek
Stepan MartinekAuthorBest answer
Associate II
January 4, 2022

I have figured it out. For some unknown reason I was missing `__abs_integral` in front of `(_Tp __val)` on line 89 of the file c++/9.3.1/numeric. It's OK now.