g++ -O3 -march=native -std=c++20 -static -static-libgcc -static-libstdc++ -DEVALFILE_PATH=\"./nnue.bin\" -c Prelude.cpp -o Prelude.o
Prelude.cpp:2850: warning: "IFDBG" redefined
2850 | #define IFDBG if (DEBUG && !searchQuiet)
|
Prelude.cpp:61: note: this is the location of the previous definition
61 | #define IFDBG if constexpr (DEBUG)
|
Prelude.cpp:181:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::reset’ is not literal
181 | constexpr static const string reset = "\033[0m";
| ^~~~~
In file included from /usr/include/c++/11/string:55,
from /usr/include/c++/11/bits/locale_classes.h:40,
from /usr/include/c++/11/bits/ios_base.h:41,
from /usr/include/c++/11/ios:42,
from /usr/include/c++/11/ostream:38,
from /usr/include/c++/11/iostream:39,
from Prelude.cpp:23:
/usr/include/c++/11/bits/basic_string.h:85:11: note: ‘std::__cxx11::basic_string<char>’ is not literal because:
85 | class basic_string
| ^~~~~~~~~~~~
/usr/include/c++/11/bits/basic_string.h:85:11: note: ‘std::__cxx11::basic_string<char>’ does not have ‘constexpr’ destructor
Prelude.cpp:181:35: error: in-class initialization of static data member ‘const string Colors::reset’ of non-literal type
181 | constexpr static const string reset = "\033[0m";
| ^~~~~
Prelude.cpp:184:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::black’ is not literal
184 | constexpr static const string black = "\033[30m";
| ^~~~~
Prelude.cpp:184:35: error: in-class initialization of static data member ‘const string Colors::black’ of non-literal type
Prelude.cpp:185:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::red’ is not literal
185 | constexpr static const string red = "\033[31m";
| ^~~
Prelude.cpp:185:35: error: in-class initialization of static data member ‘const string Colors::red’ of non-literal type
Prelude.cpp:186:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::green’ is not literal
186 | constexpr static const string green = "\033[32m";
| ^~~~~
Prelude.cpp:186:35: error: in-class initialization of static data member ‘const string Colors::green’ of non-literal type
Prelude.cpp:187:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::yellow’ is not literal
187 | constexpr static const string yellow = "\033[33m";
| ^~~~~~
Prelude.cpp:187:35: error: in-class initialization of static data member ‘const string Colors::yellow’ of non-literal type
Prelude.cpp:188:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::blue’ is not literal
188 | constexpr static const string blue = "\033[34m";
| ^~~~
Prelude.cpp:188:35: error: in-class initialization of static data member ‘const string Colors::blue’ of non-literal type
Prelude.cpp:189:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::magenta’ is not literal
189 | constexpr static const string magenta = "\033[35m";
| ^~~~~~~
Prelude.cpp:189:35: error: in-class initialization of static data member ‘const string Colors::magenta’ of non-literal type
Prelude.cpp:190:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::cyan’ is not literal
190 | constexpr static const string cyan = "\033[36m";
| ^~~~
Prelude.cpp:190:35: error: in-class initialization of static data member ‘const string Colors::cyan’ of non-literal type
Prelude.cpp:191:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::white’ is not literal
191 | constexpr static const string white = "\033[37m";
| ^~~~~
Prelude.cpp:191:35: error: in-class initialization of static data member ‘const string Colors::white’ of non-literal type
Prelude.cpp:194:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::bright_black’ is not literal
194 | constexpr static const string bright_black = "\033[90m";
| ^~~~~~~~~~~~
Prelude.cpp:194:35: error: in-class initialization of static data member ‘const string Colors::bright_black’ of non-literal type
Prelude.cpp:195:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::bright_red’ is not literal
195 | constexpr static const string bright_red = "\033[91m";
| ^~~~~~~~~~
Prelude.cpp:195:35: error: in-class initialization of static data member ‘const string Colors::bright_red’ of non-literal type
Prelude.cpp:196:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::bright_green’ is not literal
196 | constexpr static const string bright_green = "\033[92m";
| ^~~~~~~~~~~~
Prelude.cpp:196:35: error: in-class initialization of static data member ‘const string Colors::bright_green’ of non-literal type
Prelude.cpp:197:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::bright_yellow’ is not literal
197 | constexpr static const string bright_yellow = "\033[93m";
| ^~~~~~~~~~~~~
Prelude.cpp:197:35: error: in-class initialization of static data member ‘const string Colors::bright_yellow’ of non-literal type
Prelude.cpp:198:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::bright_blue’ is not literal
198 | constexpr static const string bright_blue = "\033[94m";
| ^~~~~~~~~~~
Prelude.cpp:198:35: error: in-class initialization of static data member ‘const string Colors::bright_blue’ of non-literal type
Prelude.cpp:199:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::bright_magenta’ is not literal
199 | constexpr static const string bright_magenta = "\033[95m";
| ^~~~~~~~~~~~~~
Prelude.cpp:199:35: error: in-class initialization of static data member ‘const string Colors::bright_magenta’ of non-literal type
Prelude.cpp:200:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::bright_cyan’ is not literal
200 | constexpr static const string bright_cyan = "\033[96m";
| ^~~~~~~~~~~
Prelude.cpp:200:35: error: in-class initialization of static data member ‘const string Colors::bright_cyan’ of non-literal type
Prelude.cpp:201:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::bright_white’ is not literal
201 | constexpr static const string bright_white = "\033[97m";
| ^~~~~~~~~~~~
Prelude.cpp:201:35: error: in-class initialization of static data member ‘const string Colors::bright_white’ of non-literal type
Prelude.cpp:203:35: error: the type ‘const string’ {aka ‘const std::__cxx11::basic_string<char>’} of ‘constexpr’ variable ‘Colors::grey’ is not literal
203 | constexpr static const string grey = bright_black;
| ^~~~
Prelude.cpp:203:35: error: in-class initialization of static data member ‘const string Colors::grey’ of non-literal type
Prelude.cpp: In function ‘std::string abbreviateNum(i64)’:
Prelude.cpp:365:37: error: ‘format’ is not a member of ‘std’
365 | if (v > 1000000000) return std::format("{:.2f} g", v / 1000000000.0);
| ^~~~~~
Prelude.cpp:366:34: error: ‘format’ is not a member of ‘std’
366 | if (v > 1000000) return std::format("{:.2f} m", v / 1000000.0);
| ^~~~~~
Prelude.cpp:367:31: error: ‘format’ is not a member of ‘std’
367 | if (v > 1000) return std::format("{:.2f} k", v / 1000.0);
| ^~~~~~
Prelude.cpp: In function ‘constexpr int antiDiagonalOf(Square)’:
Prelude.cpp:565:59: warning: arithmetic between different enumeration types ‘Rank’ and ‘File’ is deprecated [-Wdeprecated-enum-enum-conversion]
565 | constexpr int antiDiagonalOf(Square s) { return rankOf(s) + fileOf(s); }
| ~~~~~~~~~~^~~~~~~~~~~
Prelude.cpp: In function ‘constexpr u64 getRookAttacks(Square, u64)’:
Prelude.cpp:692:1: error: the value of ‘ROOK_ATTACKS’ is not usable in a constant expression
692 | }
| ^
Prelude.cpp:645:5: note: ‘ROOK_ATTACKS’ was not declared ‘constexpr’
645 | u64 ROOK_ATTACKS[64][4096];
| ^~~~~~~~~~~~
Prelude.cpp: In function ‘constexpr u64 getBishopAttacks(Square, u64)’:
Prelude.cpp:758:1: error: the value of ‘BISHOP_ATTACKS’ is not usable in a constant expression
758 | }
| ^
Prelude.cpp:711:5: note: ‘BISHOP_ATTACKS’ was not declared ‘constexpr’
711 | u64 BISHOP_ATTACKS[64][512];
| ^~~~~~~~~~~~~~
In file included from /usr/include/c++/11/cassert:44,
from Prelude.cpp:32:
Prelude.cpp: In member function ‘constexpr int Board::flipIndex(int)’:
Prelude.cpp:2133:95: error: temporary of non-literal type ‘std::__cxx11::basic_string<char>’ in a constant expression
2133 | IFDBG m_assert((index >= 0 && index <= 63), "Invalid index: " + std::to_string(index) + ". Must be between 0 and 63.");
| ^
Prelude.cpp:2133:15: note: in expansion of macro ‘m_assert’
2133 | IFDBG m_assert((index >= 0 && index <= 63), "Invalid index: " + std::to_string(index) + ". Must be between 0 and 63.");
| ^~~~~~~~
Prelude.cpp: In function ‘MoveEvaluation iterativeDeepening(Board&, int, std::atomic<bool>&, int, int, int, int, int, int)’:
Prelude.cpp:2949:40: error: ‘setprecision’ is not a member of ‘std’
2949 | cout << std::fixed << std::setprecision(2);
| ^~~~~~~~~~~~
Prelude.cpp:2951:78: error: ‘format’ is not a member of ‘std’
2951 | const string fancyEval = (bestMove.eval > 0 ? '+' : '\0') + std::format("{:.2f}", bestMove.eval / 100.0);
| ^~~~~~
Prelude.cpp:2961:37: error: ‘format’ is not a member of ‘std’
2961 | cout << padStr(std::format("{:.1f}%", hashPercent), 9);
| ^~~~~~
Prelude.cpp:2967:64: error: ‘setprecision’ is not a member of ‘std’
2967 | cout << Colors::reset << std::defaultfloat << std::setprecision(6) << endl;
| ^~~~~~~~~~~~
Prelude.cpp: In function ‘std::string makeFileName()’:
Prelude.cpp:3164:27: error: ‘format’ is not a member of ‘std’
3164 | return "data-" + std::format("{:04}-{:02}-{:02}", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday) + "-" + randomStr + ".preludedata";
| ^~~~~~
Prelude.cpp: In function ‘void playGames()’:
Prelude.cpp:3232:45: error: ‘format’ is not a member of ‘std’
3232 | cout << "Positions/second: " + std::format("{:.2f}", avgPosPerSec) << endl;
| ^~~~~~
make: *** [makefile:24: Prelude.o] Error 1