V
V
Vadim Ushakov2021-09-20 01:43:47
C++ / C#
Vadim Ushakov, 2021-09-20 01:43:47

What is the lexical error?

template <class... Args>
constexpr void unused(Args&&...)


An error occurs while compiling

==== Building licenses (release) ====
SelfContainStorage.cpp
src/Machinarium/DataStorages/SelfContainStorage.cpp: In member function ‘Machinarium::DataStorages::SelfContainStorage Machinarium::DataStorages::SelfContainStorage::SetKey(std::string, std::string)’:
src/Machinarium/DataStorages/SelfContainStorage.cpp:33:75: warning: unused parameter ‘key’ [-Wunused-parameter]
   33 | orage SelfContainStorage::SetKey(/* Index key. */std::string key,
      |                                                  ~~~~~~~~~~~~^~~

src/Machinarium/DataStorages/SelfContainStorage.cpp:34:77: warning: unused parameter ‘value’ [-Wunused-parameter]
   34 | Value to store by key in self executed object. */std::string value)
      |                                                  ~~~~~~~~~~~~^~~~~

src/Machinarium/DataStorages/SelfContainStorage.cpp: In member function ‘std::string Machinarium::DataStorages::SelfContainStorage::GetKey(std::string)’:
src/Machinarium/DataStorages/SelfContainStorage.cpp:40:130: warning: unused parameter ‘key’ [-Wunused-parameter]
   40 |  Value's key to index in self executed object. */std::string key)
      |                                                  ~~~~~~~~~~~~^~~

src/Machinarium/DataStorages/SelfContainStorage.cpp: In static member function ‘static Machinarium::Types::ullong Machinarium::DataStorages::SelfContainStorage::GetInternalDataStartPos(bool)’:
src/Machinarium/DataStorages/SelfContainStorage.cpp:187:5: warning: suggest explicit braces to avoid ambiguous ‘else’ [-Wdangling-else]
  187 |  if (__block_pos != 0)
      |     ^
src/Machinarium/DataStorages/SelfContainStorage.cpp: In static member function ‘static const string& Machinarium::DataStorages::SelfContainStorage::SetGetKeyValue(const string&, const string&)’:
src/Machinarium/DataStorages/SelfContainStorage.cpp:256:36: warning: reference to local variable ‘storage_block’ returned [-Wreturn-local-addr]
  256 |  if (storage_block.empty()) return storage_block;
      |                                    ^~~~~~~~~~~~~
src/Machinarium/DataStorages/SelfContainStorage.cpp:254:7: note: declared here
  254 |  auto storage_block = ReadInternalStorageBlock();
      |       ^~~~~~~~~~~~~
src/Machinarium/DataStorages/SelfContainStorage.cpp:279:16: warning: returning reference to temporary [-Wreturn-local-addr]
  279 |    return std::string();
      |                ^~~~~~~~
src/Machinarium/DataStorages/SelfContainStorage.cpp:295:14: warning: returning reference to temporary [-Wreturn-local-addr]
  295 |  return std::string();
      |              ^~~~~~~~
In file included from deps/LuaBridge3/Source/LuaBridge/detail/Stack.h:10,
                 from deps/LuaBridge3/Source/LuaBridge/detail/FuncTraits.h:12,
                 from deps/LuaBridge3/Source/LuaBridge/detail/CFunctions.h:11,
                 from deps/LuaBridge3/Source/LuaBridge/LuaBridge.h:22,
                 from src/Machinarium/DataStorages/SelfContainStorage.cpp:298:
deps/LuaBridge3/Source/LuaBridge/detail/LuaHelpers.h: At global scope:
deps/LuaBridge3/Source/LuaBridge/detail/LuaHelpers.h:98:27: error: expected ‘)’ before ‘&&’ token
   98 | constexpr void unused(Args&&...)
      |                      ~    ^~
      |                           )
licenses.make:148: recipe for target 'obj/Release/licenses/SelfContainStorage.o' failed
make[1]: *** [obj/Release/licenses/SelfContainStorage.o] Error 1
Makefile:30: recipe for target 'licenses' failed
make: *** [licenses] Error 2


Variable template. Supported since C++11, the project includes the C++17 standard .

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question