Simple code seems to compile well but http example doesn't
Frist tried in Windows 10, gcc 10.3.0
Then updated msys2 to the latest version, ran "pacman -S mingw-w64-ucrt-x86_64-gcc" so gcc 12.2.0
But I'm getting the same error:
[] Generating source file
[] Compiling with preset: speed
In file included from C:\nerd.nerd\l4jwv\nerdcore/src/nerd.hpp:63,
from C:\nerd.nerd\l4jwv\index.cpp:35:
C:\nerd.nerd\l4jwv\index.cpp: In lambda function:
C:\nerd.nerd\l4jwv\index.cpp:135:40: error: no matching function for call to 'NerdCore::Class::Function::New()'
135 | var _res = __NERD_NEW(_protoRes)();
| ^
C:\nerd.nerd\l4jwv\nerdcore/src/macro.h:38:209: note: in definition of macro '__NERD_Create_Ptr_Scoped_Copy_Anon'
38 | #define __NERD_Create_Ptr_Scoped_Copy_Anon(CONTENT) new NerdCore::Type::function_t([=](NerdCore::VAR& __NERD_THIS, NerdCore::VAR* __NERD_VARARGS, int __NERD_VARLENGTH) mutable -> NerdCore::Global::var { CONTENT })
|
^~~~~~~~~~~
C:\nerd.nerd\l4jwv\index.cpp:117:27: note: in expansion of macro '__NERD_Create_Var_Scoped_Copy_Anon'
117 | http [ "createServer" ] = __NERD_Create_Var_Scoped_Copy_Anon ({ var _cb ; if ( __NERD_VARLENGTH > 0 ) _cb = __NERD_VARARGS[0];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\nerd.nerd\l4jwv\nerdcore/src/macro.h:45:103: note: in expansion of macro '__NERD_Create_Ptr_Scoped_Copy_Anon'
45 | #define __NERD_Create_Var_Scoped_Copy_Anon(CONTENT) NerdCore::VAR(NerdCore::Enum::Type::Function, __NERD_Create_Ptr_Scoped_Copy_Anon(CONTENT))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\nerd.nerd\l4jwv\index.cpp:121:21: note: in expansion of macro '__NERD_Create_Var_Scoped_Copy_Anon'
121 | app [ "listen" ] = __NERD_Create_Var_Scoped_Copy_Anon ({ var _port ; if ( __NERD_VARLENGTH > 0 ) _port = __NERD_VARARGS[0]; var _listenCB ; if ( __NERD_VARLENGTH > 1 ) _listenCB = __NERD_VARARGS[1];
Simple code seems to compile well but http example doesn't
Frist tried in Windows 10, gcc 10.3.0
Then updated msys2 to the latest version, ran "pacman -S mingw-w64-ucrt-x86_64-gcc" so gcc 12.2.0
But I'm getting the same error:
[] Generating source file
[] Compiling with preset: speed
In file included from C:\nerd.nerd\l4jwv\nerdcore/src/nerd.hpp:63,
from C:\nerd.nerd\l4jwv\index.cpp:35:
C:\nerd.nerd\l4jwv\index.cpp: In lambda function:
C:\nerd.nerd\l4jwv\index.cpp:135:40: error: no matching function for call to 'NerdCore::Class::Function::New()'
135 | var _res = __NERD_NEW(_protoRes)();
| ^
C:\nerd.nerd\l4jwv\nerdcore/src/macro.h:38:209: note: in definition of macro '__NERD_Create_Ptr_Scoped_Copy_Anon'
38 | #define __NERD_Create_Ptr_Scoped_Copy_Anon(CONTENT) new NerdCore::Type::function_t([=](NerdCore::VAR& __NERD_THIS, NerdCore::VAR* __NERD_VARARGS, int __NERD_VARLENGTH) mutable -> NerdCore::Global::var { CONTENT })
|
^~~~~~~~~~~
C:\nerd.nerd\l4jwv\index.cpp:117:27: note: in expansion of macro '__NERD_Create_Var_Scoped_Copy_Anon'
117 | http [ "createServer" ] = __NERD_Create_Var_Scoped_Copy_Anon ({ var _cb ; if ( __NERD_VARLENGTH > 0 ) _cb = __NERD_VARARGS[0];
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\nerd.nerd\l4jwv\nerdcore/src/macro.h:45:103: note: in expansion of macro '__NERD_Create_Ptr_Scoped_Copy_Anon'
45 | #define __NERD_Create_Var_Scoped_Copy_Anon(CONTENT) NerdCore::VAR(NerdCore::Enum::Type::Function, __NERD_Create_Ptr_Scoped_Copy_Anon(CONTENT))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\nerd.nerd\l4jwv\index.cpp:121:21: note: in expansion of macro '__NERD_Create_Var_Scoped_Copy_Anon'
121 | app [ "listen" ] = __NERD_Create_Var_Scoped_Copy_Anon ({ var _port ; if ( __NERD_VARLENGTH > 0 ) _port = __NERD_VARARGS[0]; var _listenCB ; if ( __NERD_VARLENGTH > 1 ) _listenCB = __NERD_VARARGS[1];