diff --git a/program/cpp/api/string.hpp b/program/cpp/api/string.hpp index 74096285..ca6cc8e6 100644 --- a/program/cpp/api/string.hpp +++ b/program/cpp/api/string.hpp @@ -10,10 +10,11 @@ union String { constexpr String() {} // DON'T TOUCH String(std::string_view value); - String &operator =(std::string_view value); template String(const char (&value)[N]); + String &operator =(std::string_view value); + // String operations void append(const String &value); void append(std::string_view value); diff --git a/src/cpp/script_cpp.cpp b/src/cpp/script_cpp.cpp index 49356acf..e77374ab 100644 --- a/src/cpp/script_cpp.cpp +++ b/src/cpp/script_cpp.cpp @@ -109,7 +109,7 @@ Variant CPPScript::_get_rpc_config() const { CPPScript::CPPScript() { source_code = R"C0D3(#include "api.hpp" -extern "C" Variant public_function(Variant arg) { +extern "C" Variant public_function(String arg) { print("Arguments: ", arg); return "Hello from the other side"; }