Skip to content

Fixing build - #191

Merged
pkrisz99 merged 1 commit into
pkrisz99:mainfrom
galloj:fix_build
Jul 20, 2026
Merged

Fixing build#191
pkrisz99 merged 1 commit into
pkrisz99:mainfrom
galloj:fix_build

Conversation

@galloj

@galloj galloj commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Fixing the following build error:

clang++ -std=c++20 -O3 -flto -funroll-loops -fno-exceptions -DNDEBUG -Wall -Wextra -pthread -march=native -mtune=native -MMD -MP -c Board.cpp -o Board.o
In file included from Board.cpp:1:
In file included from ./Board.h:2:
In file included from ./Move.h:2:
./Utils.h:304:6: error: no template named 'optional' in namespace 'std'
std::optional<bool> ParseUCIBoolean(const std::string_view str);
~~~~~^
1 error generated.
make: *** [makefile:82: Board.o] Error 1

@pkrisz99
pkrisz99 merged commit f92dd1c into pkrisz99:main Jul 20, 2026
2 checks passed
@pkrisz99

Copy link
Copy Markdown
Owner

Thank you for spotting! Was it on g++ or another compiler?

@galloj

galloj commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

It was clang++. Just a default setup, it is kinda weird that the build was working for you and failed for me. Maybe a different version of the compiler? My is 14.0.0-1ubuntu1.1.

pkrisz99 added a commit that referenced this pull request Aug 9, 2026
Some syntax errors only affect g++ (see #191), so adding a check here to catch these. Of course, these still can change between versions, but it's better than nothing.

Bench: 5292215
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants