In file included from ceval.h:3,
from pocketpy.h:3,
from main.cpp:4:
lexer.h: In function ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’:
common.h:127:23: error: expression ‘<throw-expression>’ is not a constant expression
127 | #define FATAL_ERROR() throw std::runtime_error( __FILE__ + std::string(":") + std::to_string(__LINE__) + " FATAL_ERROR()!");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lexer.h:41:5: note: in expansion of macro ‘FATAL_ERROR’
41 | FATAL_ERROR();
| ^~~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h: In member function ‘void pkpy::Lexer::add_token(pkpy::TokenIndex, pkpy::TokenValue)’:
lexer.h:264:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
264 | case TK("{"): case TK("["): case TK("("): brackets_level++; break;
| ~~^~~~~
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
lexer.h:264:34: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
264 | case TK("{"): case TK("["): case TK("("): brackets_level++; break;
| ~~^~~~~
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
lexer.h:264:48: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
264 | case TK("{"): case TK("["): case TK("("): brackets_level++; break;
| ~~^~~~~
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
lexer.h:265:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
265 | case TK(")"): case TK("]"): case TK("}"): brackets_level--; break;
| ~~^~~~~
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
lexer.h:265:34: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
265 | case TK(")"): case TK("]"): case TK("}"): brackets_level--; break;
| ~~^~~~~
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
lexer.h:265:48: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
265 | case TK(")"): case TK("]"): case TK("}"): brackets_level--; break;
| ~~^~~~~
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h: In member function ‘virtual void pkpy::Literal0Expr::emit(pkpy::CodeEmitContext*)’:
expr.h:247:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
247 | case TK("None"): ctx->emit(OP_LOAD_NONE, BC_NOARG, line); break;
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:248:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
248 | case TK("True"): ctx->emit(OP_LOAD_TRUE, BC_NOARG, line); break;
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:249:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
249 | case TK("False"): ctx->emit(OP_LOAD_FALSE, BC_NOARG, line); break;
| ~~^~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:250:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
250 | case TK("..."): ctx->emit(OP_LOAD_ELLIPSIS, BC_NOARG, line); break;
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h: In member function ‘virtual void pkpy::BinaryExpr::emit(pkpy::CodeEmitContext*)’:
expr.h:673:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
673 | case TK("+"): ctx->emit(OP_BINARY_ADD, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:674:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
674 | case TK("-"): ctx->emit(OP_BINARY_SUB, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:675:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
675 | case TK("*"): ctx->emit(OP_BINARY_MUL, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:676:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
676 | case TK("/"): ctx->emit(OP_BINARY_OP, 3, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:677:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
677 | case TK("//"): ctx->emit(OP_BINARY_FLOORDIV, BC_NOARG, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:678:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
678 | case TK("%"): ctx->emit(OP_BINARY_MOD, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:679:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
679 | case TK("**"): ctx->emit(OP_BINARY_OP, 6, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:681:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
681 | case TK("<"): ctx->emit(OP_COMPARE_LT, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:682:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
682 | case TK("<="): ctx->emit(OP_COMPARE_LE, BC_NOARG, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:683:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
683 | case TK("=="): ctx->emit(OP_COMPARE_EQ, BC_NOARG, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:684:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
684 | case TK("!="): ctx->emit(OP_COMPARE_NE, BC_NOARG, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:685:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
685 | case TK(">"): ctx->emit(OP_COMPARE_GT, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:686:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
686 | case TK(">="): ctx->emit(OP_COMPARE_GE, BC_NOARG, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:687:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
687 | case TK("in"): ctx->emit(OP_CONTAINS_OP, 0, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:688:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
688 | case TK("not in"): ctx->emit(OP_CONTAINS_OP, 1, line); break;
| ~~^~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:689:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
689 | case TK("is"): ctx->emit(OP_IS_OP, 0, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:690:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
690 | case TK("is not"): ctx->emit(OP_IS_OP, 1, line); break;
| ~~^~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:692:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
692 | case TK("<<"): ctx->emit(OP_BITWISE_LSHIFT, BC_NOARG, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:693:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
693 | case TK(">>"): ctx->emit(OP_BITWISE_RSHIFT, BC_NOARG, line); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:694:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
694 | case TK("&"): ctx->emit(OP_BITWISE_AND, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:695:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
695 | case TK("|"): ctx->emit(OP_BITWISE_OR, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
expr.h:696:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
696 | case TK("^"): ctx->emit(OP_BITWISE_XOR, BC_NOARG, line); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h: In member function ‘void pkpy::Compiler::exprUnaryOp()’:
compiler.h:287:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
287 | case TK("-"):
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:290:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
290 | case TK("*"):
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h: In member function ‘bool pkpy::Compiler::try_compile_assignment()’:
compiler.h:666:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
666 | case TK("+="): case TK("-="): case TK("*="): case TK("/="): case TK("//="): case TK("%="):
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:666:35: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
666 | case TK("+="): case TK("-="): case TK("*="): case TK("/="): case TK("//="): case TK("%="):
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:666:50: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
666 | case TK("+="): case TK("-="): case TK("*="): case TK("/="): case TK("//="): case TK("%="):
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:666:65: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
666 | case TK("+="): case TK("-="): case TK("*="): case TK("/="): case TK("//="): case TK("%="):
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:666:80: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
666 | case TK("+="): case TK("-="): case TK("*="): case TK("/="): case TK("//="): case TK("%="):
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:666:96: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
666 | case TK("+="): case TK("-="): case TK("*="): case TK("/="): case TK("//="): case TK("%="):
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:667:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
667 | case TK("<<="): case TK(">>="): case TK("&="): case TK("|="): case TK("^="): {
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:667:36: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
667 | case TK("<<="): case TK(">>="): case TK("&="): case TK("|="): case TK("^="): {
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:667:52: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
667 | case TK("<<="): case TK(">>="): case TK("&="): case TK("|="): case TK("^="): {
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:667:67: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
667 | case TK("<<="): case TK(">>="): case TK("&="): case TK("|="): case TK("^="): {
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:667:82: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
667 | case TK("<<="): case TK(">>="): case TK("&="): case TK("|="): case TK("^="): {
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:678:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
678 | case TK("="):
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h: In member function ‘void pkpy::Compiler::compile_stmt()’:
compiler.h:703:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
703 | case TK("break"):
| ~~^~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:708:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
708 | case TK("continue"):
| ~~^~~~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:713:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
713 | case TK("yield"):
| ~~^~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:721:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
721 | case TK("yield from"):
| ~~^~~~~~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:734:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
734 | case TK("return"):
| ~~^~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:745:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
745 | case TK("if"): compile_if_stmt(); break;
| ~~^~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:746:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
746 | case TK("while"): compile_while_loop(); break;
| ~~^~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:747:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
747 | case TK("for"): compile_for_loop(); break;
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:748:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
748 | case TK("import"): compile_normal_import(); break;
| ~~^~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:749:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
749 | case TK("from"): compile_from_import(); break;
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:750:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
750 | case TK("def"): compile_function(); break;
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:751:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
751 | case TK("@"): compile_decorated(); break;
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:752:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
752 | case TK("try"): compile_try_except(); break;
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:753:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
753 | case TK("pass"): consume_end_stmt(); break;
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:755:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
755 | case TK("assert"):
| ~~^~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:760:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
760 | case TK("global"):
| ~~^~~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:767:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
767 | case TK("raise"): {
| ~~^~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:778:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
778 | case TK("del"): {
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:785:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
785 | case TK("with"): {
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:799:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
799 | case TK("label"): {
| ~~^~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:806:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
806 | case TK("goto"):
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h: In member function ‘pkpy::PyObject* pkpy::Compiler::read_literal()’:
compiler.h:980:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
980 | case TK("-"): {
| ~~^~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:985:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
985 | case TK("@num"): return to_object(prev().value);
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:986:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
986 | case TK("@str"): return to_object(prev().value);
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:987:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
987 | case TK("True"): return VAR(true);
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:988:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
988 | case TK("False"): return VAR(false);
| ~~^~~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:989:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
989 | case TK("None"): return vm->None;
| ~~^~~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:4,
from main.cpp:4:
compiler.h:990:20: error: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ called in a constant expression
990 | case TK("..."): return vm->Ellipsis;
| ~~^~~~~~~
In file included from expr.h:5,
from compiler.h:5,
from pocketpy.h:4,
from main.cpp:4:
lexer.h:34:22: note: ‘constexpr pkpy::TokenIndex pkpy::TK(const char*)’ declared here
34 | constexpr TokenIndex TK(const char token[]) {
| ^~
In file included from pocketpy.h:9,
from main.cpp:4:
io.h: In constructor ‘pkpy::FileIO::FileIO(pkpy::VM*, pkpy::Str, pkpy::Str)’:
io.h:34:41: error: invalid conversion from ‘int’ to ‘std::ios_base::openmode’ [-fpermissive]
34 | std::ios_base::openmode extra = 0;
| ^
| |
| int
io.h:39:53: error: no matching function for call to ‘std::basic_fstream<char>::open(std::string_view, std::_Ios_Openmode)’
39 | _fs.open(file.sv(), std::ios::in | extra);
| ^
In file included from main.cpp:1:
/usr/include/c++/10/fstream:1177:7: note: candidate: ‘void std::basic_fstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::ios_base::openmode]’
1177 | open(const char* __s,
| ^~~~
/usr/include/c++/10/fstream:1177:24: note: no known conversion for argument 1 from ‘std::string_view’ {aka ‘std::basic_string_view<char>’} to ‘const char*’
1177 | open(const char* __s,
| ~~~~~~~~~~~~^~~
/usr/include/c++/10/fstream:1218:7: note: candidate: ‘void std::basic_fstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::ios_base::openmode]’
1218 | open(const std::string& __s,
| ^~~~
/usr/include/c++/10/fstream:1218:31: note: no known conversion for argument 1 from ‘std::string_view’ {aka ‘std::basic_string_view<char>’} to ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’}
1218 | open(const std::string& __s,
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/fstream:1240:2: note: candidate: ‘template<class _Path> std::_If_fs_path<_Path, void> std::basic_fstream<_CharT, _Traits>::open(const _Path&, std::ios_base::openmode) [with _Path = _Path; _CharT = char; _Traits = std::char_traits<char>]’
1240 | open(const _Path& __s,
| ^~~~
/usr/include/c++/10/fstream:1240:2: note: template argument deduction/substitution failed:
/usr/include/c++/10/fstream: In substitution of ‘template<class _Path> std::_If_fs_path<_Path, void, decltype (declval<_Path&>().make_preferred().filename())> std::basic_fstream<char>::open<_Path>(const _Path&, std::ios_base::openmode) [with _Path = std::basic_string_view<char>]’:
io.h:39:53: required from here
/usr/include/c++/10/fstream:1240:2: error: ‘class std::basic_string_view<char>’ has no member named ‘make_preferred’
In file included from pocketpy.h:9,
from main.cpp:4:
io.h:41:54: error: no matching function for call to ‘std::basic_fstream<char>::open(std::string_view, std::_Ios_Openmode)’
41 | _fs.open(file.sv(), std::ios::out | extra);
| ^
In file included from main.cpp:1:
/usr/include/c++/10/fstream:1177:7: note: candidate: ‘void std::basic_fstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::ios_base::openmode]’
1177 | open(const char* __s,
| ^~~~
/usr/include/c++/10/fstream:1177:24: note: no known conversion for argument 1 from ‘std::string_view’ {aka ‘std::basic_string_view<char>’} to ‘const char*’
1177 | open(const char* __s,
| ~~~~~~~~~~~~^~~
/usr/include/c++/10/fstream:1218:7: note: candidate: ‘void std::basic_fstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::ios_base::openmode]’
1218 | open(const std::string& __s,
| ^~~~
/usr/include/c++/10/fstream:1218:31: note: no known conversion for argument 1 from ‘std::string_view’ {aka ‘std::basic_string_view<char>’} to ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’}
1218 | open(const std::string& __s,
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/fstream:1240:2: note: candidate: ‘template<class _Path> std::_If_fs_path<_Path, void> std::basic_fstream<_CharT, _Traits>::open(const _Path&, std::ios_base::openmode) [with _Path = _Path; _CharT = char; _Traits = std::char_traits<char>]’
1240 | open(const _Path& __s,
| ^~~~
/usr/include/c++/10/fstream:1240:2: note: template argument deduction/substitution failed:
/usr/include/c++/10/fstream: In substitution of ‘template<class _Path> std::_If_fs_path<_Path, void, decltype (declval<_Path&>().make_preferred().filename())> std::basic_fstream<char>::open<_Path>(const _Path&, std::ios_base::openmode) [with _Path = std::basic_string_view<char>]’:
io.h:41:54: required from here
/usr/include/c++/10/fstream:1240:2: error: ‘class std::basic_string_view<char>’ has no member named ‘make_preferred’
In file included from pocketpy.h:9,
from main.cpp:4:
io.h:43:54: error: no matching function for call to ‘std::basic_fstream<char>::open(std::string_view, std::_Ios_Openmode)’
43 | _fs.open(file.sv(), std::ios::app | extra);
| ^
In file included from main.cpp:1:
/usr/include/c++/10/fstream:1177:7: note: candidate: ‘void std::basic_fstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::ios_base::openmode]’
1177 | open(const char* __s,
| ^~~~
/usr/include/c++/10/fstream:1177:24: note: no known conversion for argument 1 from ‘std::string_view’ {aka ‘std::basic_string_view<char>’} to ‘const char*’
1177 | open(const char* __s,
| ~~~~~~~~~~~~^~~
/usr/include/c++/10/fstream:1218:7: note: candidate: ‘void std::basic_fstream<_CharT, _Traits>::open(const string&, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::string = std::__cxx11::basic_string<char>; std::ios_base::openmode = std::ios_base::openmode]’
1218 | open(const std::string& __s,
| ^~~~
/usr/include/c++/10/fstream:1218:31: note: no known conversion for argument 1 from ‘std::string_view’ {aka ‘std::basic_string_view<char>’} to ‘const string&’ {aka ‘const std::__cxx11::basic_string<char>&’}
1218 | open(const std::string& __s,
| ~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/fstream:1240:2: note: candidate: ‘template<class _Path> std::_If_fs_path<_Path, void> std::basic_fstream<_CharT, _Traits>::open(const _Path&, std::ios_base::openmode) [with _Path = _Path; _CharT = char; _Traits = std::char_traits<char>]’
1240 | open(const _Path& __s,
| ^~~~
/usr/include/c++/10/fstream:1240:2: note: template argument deduction/substitution failed:
/usr/include/c++/10/fstream: In substitution of ‘template<class _Path> std::_If_fs_path<_Path, void, decltype (declval<_Path&>().make_preferred().filename())> std::basic_fstream<char>::open<_Path>(const _Path&, std::ios_base::openmode) [with _Path = std::basic_string_view<char>]’:
io.h:43:54: required from here
/usr/include/c++/10/fstream:1240:2: error: ‘class std::basic_string_view<char>’ has no member named ‘make_preferred’
attempting to compile the main.cpp with the release pocketpy.h results in the same issue