You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
Since commit edbcc82 I can not build Elektra on my machine any more. It looks like the statement
c.template activate (i);
in the file testcpp_contextual_update.cpp and testcpp_contextual_basic.cpp is the cause of the problem. Unfortunately I do not know what this statement does. Maybe someone with more knowledge of C++ is able to (show me how to) fix this issue. Below is one of the error message reported by make:
src/bindings/cpp/tests/testcpp_contextual_update.cpp:34:13: error: no matching member function for call to
'activate'
c.template activate (i);
~~~~~~~~~~~^~~~~~~~
Here is the whole output of make just before the build process fails:
Scanning dependencies of target testcpp_contextual_update
[ 68%] Building CXX object src/bindings/cpp/tests/CMakeFiles/testcpp_contextual_update.dir/testcpp_contextual_update.cpp.o
In file included from src/bindings/cpp/tests/testcpp_contextual_update.cpp:9:
src/bindings/cpp/include/kdbthread.hpp:145:10: warning: moving a local object in a return statement prevents copy
elision [-Wpessimizing-move]
return std::move (lock);
^
src/bindings/cpp/include/kdbthread.hpp:145:10: note: remove std::move call here
return std::move (lock);
^~~~~~~~~~~ ~
src/bindings/cpp/include/kdbthread.hpp:277:10: warning: moving a local object in a return statement prevents copy
elision [-Wpessimizing-move]
return std::move (ret);
^
src/bindings/cpp/include/kdbthread.hpp:277:10: note: remove std::move call here
return std::move (ret);
^~~~~~~~~~~ ~
In file included from src/bindings/cpp/tests/testcpp_contextual_update.cpp:9:
In file included from src/bindings/cpp/include/kdbthread.hpp:12:
In file included from src/bindings/cpp/include/kdbcontext.hpp:14:
src/bindings/cpp/include/kdbvalue.hpp:590:14: warning: 'layerId' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]
std::string layerId () const
^
src/bindings/cpp/tests/testcpp_contextual_update.cpp:26:27: note: in instantiation of template class
'kdb::Value<std::__1::basic_string<char>, kdb::ContextPolicyIs<kdb::ThreadContext>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs,
kdb::DefaultPolicyArgs>' requested here
ThreadValue<std::string> i;
^
src/bindings/cpp/include/kdbvalue.hpp:80:22: note: overridden virtual function is here
virtual std::string layerId () const = 0;
^
src/bindings/cpp/include/kdbvalue.hpp:595:14: warning: 'layerVal' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]
std::string layerVal () const
^
src/bindings/cpp/include/kdbvalue.hpp:81:22: note: overridden virtual function is here
virtual std::string layerVal () const = 0;
^
src/bindings/cpp/include/kdbvalue.hpp:590:14: warning: 'layerId' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]
std::string layerId () const
^
src/bindings/cpp/tests/testcpp_contextual_update.cpp:27:19: note: in instantiation of template class
'kdb::Value<int, kdb::ContextPolicyIs<kdb::ThreadContext>, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs, kdb::DefaultPolicyArgs>' requested
here
ThreadValue<int> x;
^
src/bindings/cpp/include/kdbvalue.hpp:80:22: note: overridden virtual function is here
virtual std::string layerId () const = 0;
^
src/bindings/cpp/include/kdbvalue.hpp:595:14: warning: 'layerVal' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]
std::string layerVal () const
^
src/bindings/cpp/include/kdbvalue.hpp:81:22: note: overridden virtual function is here
virtual std::string layerVal () const = 0;
^
src/bindings/cpp/tests/testcpp_contextual_update.cpp:34:13: error: no matching member function for call to
'activate'
c.template activate (i);
~~~~~~~~~~~^~~~~~~~
src/bindings/cpp/include/kdbthread.hpp:323:25: note: candidate template ignored: couldn't infer template argument
'T'
std::shared_ptr<Layer> activate (Args &&... args)
^
src/bindings/cpp/tests/testcpp_contextual_update.cpp:43:13: error: no matching member function for call to
'activate'
c.template activate (i);
~~~~~~~~~~~^~~~~~~~
src/bindings/cpp/include/kdbthread.hpp:323:25: note: candidate template ignored: couldn't infer template argument
'T'
std::shared_ptr<Layer> activate (Args &&... args)
^
src/bindings/cpp/tests/testcpp_contextual_update.cpp:91:13: error: no matching member function for call to
'activate'
c.template activate (i);
~~~~~~~~~~~^~~~~~~~
src/bindings/cpp/include/kdbthread.hpp:323:25: note: candidate template ignored: couldn't infer template argument
'T'
std::shared_ptr<Layer> activate (Args &&... args)
^
6 warnings and 3 errors generated.
make[2]: *** [src/bindings/cpp/tests/CMakeFiles/testcpp_contextual_update.dir/testcpp_contextual_update.cpp.o] Error 1
make[1]: *** [src/bindings/cpp/tests/CMakeFiles/testcpp_contextual_update.dir/all] Error 2
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
The problem was also present under clang in Linux. Seems like clang is less sloppy with .template outside of templates.
In testcpp_contextual_basic.cpp I think .template is needed (because it is a typed test which is implemented as template). Please reopen the issue if it is not fixed for you.
Since commit edbcc82 I can not build Elektra on my machine any more. It looks like the statement
c.template activate (i);
in the file testcpp_contextual_update.cpp and testcpp_contextual_basic.cpp is the cause of the problem. Unfortunately I do not know what this statement does. Maybe someone with more knowledge of C++ is able to (show me how to) fix this issue. Below is one of the error message reported by
make
:Here is the whole output of
make
just before the build process fails:The text was updated successfully, but these errors were encountered: