Kistler-Group / sdbus-cpp

High-level C++ D-Bus library for Linux designed to provide easy-to-use yet powerful API in modern C++
GNU Lesser General Public License v2.1
311 stars 135 forks source link

Issue compiling on Ubuntu 19.10 (gcc 8.3) #98

Closed mnsgs closed 4 years ago

mnsgs commented 4 years ago

Hi,

I am trying to get the basic working through the client example of https://github.com/Kistler-Group/sdbus-cpp/blob/master/docs/using-sdbus-c%2B%2B.md#implementing-the-concatenator-example-using-basic-sdbus-c-api-layer using the v0.8.1 release.

The library appears successfully compiled according to: cmake -S. -B./build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake --build build && cd build && sudo ninja install

The client example is built using the CMakeLists.txt: cat CMakeLists.txt cmake_minimum_required (VERSION 3.13)

project (sdbus-test)

find_package (sdbus-c++ REQUIRED)

add_executable (sdbus-test src/main.cpp) target_link_libraries(sdbus-test PRIVATE SDBusCpp::sdbus-c++)

which fails according to cmake -S. -B./build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake --build build/ -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /home/martin/work/sdbus-cpp-test/build [1/2] Building CXX object CMakeFiles/sdbus-test.dir/src/main.cpp.o FAILED: CMakeFiles/sdbus-test.dir/src/main.cpp.o /usr/bin/c++ -isystem /usr/local/include -MD -MT CMakeFiles/sdbus-test.dir/src/main.cpp.o -MF CMakeFiles/sdbus-test.dir/src/main.cpp.o.d -o CMakeFiles/sdbus-test.dir/src/main.cpp.o -c ../src/main.cpp In file included from /usr/local/include/sdbus-c++/Message.h:30, from /usr/local/include/sdbus-c++/ConvenienceApiClasses.h:30, from /usr/local/include/sdbus-c++/IObject.h:30, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/local/include/sdbus-c++/TypeTraits.h: In function ‘constexpr decltype(auto) sdbus::detail::apply_impl(_Function&&, _Tuple&&, std::index_sequence<_I ...>)’: /usr/local/include/sdbus-c++/TypeTraits.h:541:33: error: ‘is_void_v’ is not a member of ‘std’ if constexpr (!std::is_void_v<function_result_t<_Function>>) ^~~~~ /usr/local/include/sdbus-c++/TypeTraits.h:541:33: note: suggested alternative: ‘is_void’ if constexpr (!std::is_void_v<function_result_t<_Function>>) ^~~~~ is_void /usr/local/include/sdbus-c++/TypeTraits.h:541:70: error: expected primary-expression before ‘>’ token if constexpr (!std::is_void_v<function_result_t<_Function>>) ^~ /usr/local/include/sdbus-c++/TypeTraits.h:541:72: error: expected primary-expression before ‘)’ token if constexpr (!std::is_void_v<function_result_t<_Function>>) ^ In file included from /usr/local/include/sdbus-c++/IObject.h:489, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl: In member function ‘sdbus::MethodRegistrator& sdbus::MethodRegistrator::withInputParamNames(_String ...)’: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:28: error: ‘conjunction_v’ is not a member of ‘std’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:28: note: suggested alternative: ‘function’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ function /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:83: error: expected primary-expression before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:83: error: expected ‘,’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ , /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:83: error: expected string-literal before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:83: error: expected ‘)’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ~ ^~~ ) In file included from /usr/local/include/sdbus-c++/IObject.h:489, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl: In member function ‘sdbus::MethodRegistrator& sdbus::MethodRegistrator::withOutputParamNames(_String ...)’: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:28: error: ‘conjunction_v’ is not a member of ‘std’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:28: note: suggested alternative: ‘function’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ function /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:83: error: expected primary-expression before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:83: error: expected ‘,’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ , /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:83: error: expected string-literal before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:83: error: expected ‘)’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ~ ^~~ ) /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl: In member function ‘sdbus::SignalRegistrator& sdbus::SignalRegistrator::withParameters(_String ...)’: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:28: error: ‘conjunction_v’ is not a member of ‘std’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:28: note: suggested alternative: ‘function’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ function /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:83: error: expected primary-expression before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:83: error: expected ‘,’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ , /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:83: error: expected string-literal before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:83: error: expected ‘)’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ~ ^~~ ) In file included from /usr/local/include/sdbus-c++/Message.h:30, from /usr/local/include/sdbus-c++/ConvenienceApiClasses.h:30, from /usr/local/include/sdbus-c++/IObject.h:30, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/local/include/sdbus-c++/TypeTraits.h: In instantiation of ‘constexpr decltype(auto) sdbus::detail::apply_impl(_Function&&, _Tuple&&, std::index_sequence<_I ...>) [with _Function = const sdbus::Properties_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::cxx11::basic_string, sdbus::Variant>&, const std::vector<std::cxx11::basic_string >&)>&; _Tuple = std::tuple<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_ string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >&; long unsigned int ..._I = {0, 1, 2}; std::index_sequence<_I ...> = std::integer_sequence<long unsigned int, 0, 1, 2>]’: /usr/local/include/sdbus-c++/TypeTraits.h:553:34: required from ‘constexpr decltype(auto) sdbus::apply(_Function&&, _Tuple&&) [with _Function = const sdbus::Properties_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::cxx11::basic_string, sdbus::Variant>&, const std::vector<std::cxx11::basic_string >&)>&; _Tuple = std::tuple<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_string<char, std::char_traits, st d::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >&]’ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:634:25: required from ‘void sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::Properties_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::cxx11::basic_string, sdbus::Variant>&, const std::vector<std::cxx11::basic_string >&)>]’ /usr/local/include/sdbus-c++/StandardInterfaces.h:111:30: required from here /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: inconsistent deduction for auto return type: ‘void’ and then ‘std::tuple<>’ return std::forward<_Function>(f)(std::get<_I>(std::forward<_Tuple>(t))...), std::tuple<>{}; ^ /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: return-statement with a value, in function returning ‘void’ [-fpermissive] /usr/local/include/sdbus-c++/TypeTraits.h: In instantiation of ‘constexpr decltype(auto) sdbus::detail::apply_impl(_Function&&, _Tuple&&, std::index_sequence<_I ...>) [with _Function = const sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::map<std::cxx11::basic_string, std::map<std::cxx11::basic_string, sdbus::Variant> >&)>&; _Tuple = std::tuple<sdbus::ObjectPath, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Vari ant, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > >, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > > > > > >&; long unsigned int ..._I = {0, 1}; std::index_sequence<_I ...> = std::integer_sequence<long unsigned int, 0, 1>]’: /usr/local/include/sdbus-c++/TypeTraits.h:553:34: required from ‘constexpr decltype(auto) sdbus::apply(_Function&&, _Tuple&&) [with _Function = const sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::map<std::cxx11::basic_string, std::map<std::cxx11::basic_string, sdbus::Variant> >&)>&; _Tuple = std::tuple<sdbus::ObjectPath, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_stri ng<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > >, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::c xx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > > > > > >&]’ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:634:25: required from ‘void sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::map<std::__cxx11::basic_string, std::map<std::cxx11::basic_string, sdbus::Variant> >&)>]’ /usr/local/include/sdbus-c++/StandardInterfaces.h:158:30: required from here /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: inconsistent deduction for auto return type: ‘void’ and then ‘std::tuple<>’ /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: return-statement with a value, in function returning ‘void’ [-fpermissive] /usr/local/include/sdbus-c++/TypeTraits.h: In instantiation of ‘constexpr decltype(auto) sdbus::detail::apply_impl(_Function&&, _Tuple&&, std::index_sequence<_I ...>) [with _Function = const sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::vector<std::cxx11::basic_string >&)>&; _Tuple = std::tuple<sdbus::ObjectPath, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >&; long unsigned int ..._I = {0, 1}; std::index_sequenc e<_I ...> = std::integer_sequence<long unsigned int, 0, 1>]’: /usr/local/include/sdbus-c++/TypeTraits.h:553:34: required from ‘constexpr decltype(auto) sdbus::apply(_Function&&, _Tuple&&) [with _Function = const sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::vector<std::cxx11::basic_string >&)>&; _Tuple = std::tuple<sdbus::ObjectPath, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >&]’ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:634:25: required from ‘void sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::vector<std::cxx11::basic_string >&)>]’ /usr/local/include/sdbus-c++/StandardInterfaces.h:167:30: required from here /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: inconsistent deduction for auto return type: ‘void’ and then ‘std::tuple<>’ /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: return-statement with a value, in function returning ‘void’ [-fpermissive] In file included from /usr/include/c++/8/functional:59, from /usr/local/include/sdbus-c++/TypeTraits.h:35, from /usr/local/include/sdbus-c++/Message.h:30, from /usr/local/include/sdbus-c++/ConvenienceApiClasses.h:30, from /usr/local/include/sdbus-c++/IObject.h:30, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/include/c++/8/bits/std_function.h: At global scope: /usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::Properties_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::cxx11::basic_string, sdbus::Variant>&, const std::vector<std::cxx11::basic_string >&)>]::<lambda(sdbus::Signal&)>; = void; = void; _Res = void; _ArgTypes = {sdbus::Signal&}]’, declared using local type ‘sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::Propertie s_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::__cxx11::basic_string, sdbus::Variant>&, const std::vector<std::cxx11::basic_string >&)>]::<lambda(sdbus::Signal&)>’, is used but never defined [-fpermissive] function<_Res(_ArgTypes...)>:: ^~~~~~~~ /usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::map<std::cxx11::basic_string, std::map<std::__cxx11::basic_string, sdbus::Variant> >&)>]::<lambda(sdbus::Signal&)>; = void; = void; _Res = void; _ArgTypes = {sdbus::Signal&}]’, declared using local type ‘sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::Ob jectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::map<std::cxx11::basic_string, std::map<std::cxx11::basic_string, sdbus::Variant> >&)>]::<lambda(sdbus::Signal&)>’, is used but never defined [-fpermissive] /usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::vector<std::cxx11::basic_string >&)>]::<lambda(sdbus::Signal&)>; = void; = void; _Res = void; _ArgTypes = {sdbus::Signal&}]’, declared using local type ‘sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::< lambda(const sdbus::ObjectPath&, const std::vector<std::__cxx11::basic_string >&)>]::<lambda(sdbus::Signal&)>’, is used but never defined [-fpermissive] ninja: build stopped: subcommand failed.

What am I missing here?

Thanks, Martin

mnsgs commented 4 years ago

Arh, I was of course missing

set(CMAKE_CXX_STANDARD 17)

from the cmakefile

sangelovic commented 4 years ago

Hi Martin, you need to tell the compiler to compile with C++17 standard. For example, like this in your CMakeLists: set(CMAKE_CXX_STANDARD 17)

Cheers, Stanislav.

On Fri, Apr 17, 2020, 11:08 Martin Siegumfeldt notifications@github.com wrote:

Hi,

I am trying to get the basic working through the client example of https://github.com/Kistler-Group/sdbus-cpp/blob/master/docs/using-sdbus-c%2B%2B.md#implementing-the-concatenator-example-using-basic-sdbus-c-api-layer using the v0.8.1 release.

The library appears successfully compiled according to:

cmake -S. -B./build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake --build build && cd build && sudo ninja install

The client example is built using the CMakeLists.txt:

`cat CMakeLists.txt cmake_minimum_required (VERSION 3.13)

project (sdbus-test)

find_package (sdbus-c++ REQUIRED)

add_executable (sdbus-test src/main.cpp) target_link_libraries(sdbus-test PRIVATE SDBusCpp::sdbus-c++) `

which fails according to cmake -S. -B./build -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON && cmake --build build/ -- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done -- Build files have been written to: /home/martin/work/sdbus-cpp-test/build [1/2] Building CXX object CMakeFiles/sdbus-test.dir/src/main.cpp.o FAILED: CMakeFiles/sdbus-test.dir/src/main.cpp.o /usr/bin/c++ -isystem /usr/local/include -MD -MT CMakeFiles/sdbus-test.dir/src/main.cpp.o -MF CMakeFiles/sdbus-test.dir/src/main.cpp.o.d -o CMakeFiles/sdbus-test.dir/src/main.cpp.o -c ../src/main.cpp In file included from /usr/local/include/sdbus-c++/Message.h:30, from /usr/local/include/sdbus-c++/ConvenienceApiClasses.h:30, from /usr/local/include/sdbus-c++/IObject.h:30, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/local/include/sdbus-c++/TypeTraits.h: In function ‘constexpr decltype(auto) sdbus::detail::apply_impl(_Function&&, _Tuple&&, std::index_sequence<_I ...>)’: /usr/local/include/sdbus-c++/TypeTraits.h:541:33: error: ‘is_void_v’ is not a member of ‘std’ if constexpr (!std::is_void_v<function_result_t<_Function>>) ^~~~~ /usr/local/include/sdbus-c++/TypeTraits.h:541:33: note: suggested alternative: ‘is_void’ if constexpr (!std::is_void_v<function_result_t<_Function>>) ^~~~~ is_void /usr/local/include/sdbus-c++/TypeTraits.h:541:70: error: expected primary-expression before ‘>’ token if constexpr (!std::is_void_v<function_result_t<_Function>>) ^~ /usr/local/include/sdbus-c++/TypeTraits.h:541:72: error: expected primary-expression before ‘)’ token if constexpr (!std::is_void_v<function_result_t<_Function>>) ^ In file included from /usr/local/include/sdbus-c++/IObject.h:489, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl: In member function ‘sdbus::MethodRegistrator& sdbus::MethodRegistrator::withInputParamNames(_String ...)’: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:28: error: ‘conjunction_v’ is not a member of ‘std’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:28: note: suggested alternative: ‘function’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ function /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:83: error: expected primary-expression before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:83: error: expected ‘,’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ , /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:83: error: expected string-literal before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:135:83: error: expected ‘)’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ~ ^~~ ) In file included from /usr/local/include/sdbus-c++/IObject.h:489, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl: In member function ‘sdbus::MethodRegistrator& sdbus::MethodRegistrator::withOutputParamNames(_String ...)’: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:28: error: ‘conjunction_v’ is not a member of ‘std’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:28: note: suggested alternative: ‘function’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ function /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:83: error: expected primary-expression before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:83: error: expected ‘,’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ , /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:83: error: expected string-literal before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:150:83: error: expected ‘)’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ~ ^~~ ) /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl: In member function ‘sdbus::SignalRegistrator& sdbus::SignalRegistrator::withParameters(_String ...)’: /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:28: error: ‘conjunction_v’ is not a member of ‘std’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:28: note: suggested alternative: ‘function’ static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~~~ function /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:83: error: expected primary-expression before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:83: error: expected ‘,’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ , /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:83: error: expected string-literal before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ^~~ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:237:83: error: expected ‘)’ before ‘...’ token static_assert(std::conjunction_v<std::is_convertible<_String, std::string>...>, "Parameter names must be (convertible to) strings"); ~ ^~~ ) In file included from /usr/local/include/sdbus-c++/Message.h:30, from /usr/local/include/sdbus-c++/ConvenienceApiClasses.h:30, from /usr/local/include/sdbus-c++/IObject.h:30, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/local/include/sdbus-c++/TypeTraits.h: In instantiation of ‘constexpr decltype(auto) sdbus::detail::apply_impl(_Function&&, _Tuple&&, std::index_sequence<_I ...>) [with _Function = const sdbus::Properties_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::cxx11::basic_string, sdbus::Variant>&, const std::vector<std::cxx11::basic_string >&)>&; _Tuple = std::tuple<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_ string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >&; long unsigned int ..._I = {0, 1, 2}; std::index_sequence<_I ...> = std::integer_sequence<long unsigned int, 0, 1, 2>]’: /usr/local/include/sdbus-c++/TypeTraits.h:553:34: required from ‘constexpr decltype(auto) sdbus::apply(_Function&&, _Tuple&&) [with _Function = const sdbus::Properties_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::cxx11::basic_string, sdbus::Variant>&, const std::vector<std::cxx11::basic_string >&)>&; _Tuple = std::tuple<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_string<char, std::char_traits, st d::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >&]’ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:634:25: required from ‘void sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::Properties_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::cxx11::basic_string, sdbus::Variant>&, const std::vector<std::cxx11::basic_string >&)>]’ /usr/local/include/sdbus-c++/StandardInterfaces.h:111:30: required from here /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: inconsistent deduction for auto return type: ‘void’ and then ‘std::tuple<>’ return std::forward<_Function>(f)(std::get<_I>(std::forward<_Tuple>(t))...), std::tuple<>{}; ^ /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: return-statement with a value, in function returning ‘void’ [-fpermissive] /usr/local/include/sdbus-c++/TypeTraits.h: In instantiation of ‘constexpr decltype(auto) sdbus::detail::apply_impl(_Function&&, _Tuple&&, std::index_sequence<_I ...>) [with _Function = const sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::map<std::cxx11::basic_string, std::map<std::cxx11::basic_string, sdbus::Variant> >&)>&; _Tuple = std::tuple<sdbus::ObjectPath, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Vari ant, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > >, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > > > > > >&; long unsigned int ..._I = {0, 1}; std::index_sequence<_I ...> = std::integer_sequence<long unsigned int, 0, 1>]’: /usr/local/include/sdbus-c++/TypeTraits.h:553:34: required from ‘constexpr decltype(auto) sdbus::apply(_Function&&, _Tuple&&) [with _Function = const sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::map<std::cxx11::basic_string, std::map<std::cxx11::basic_string, sdbus::Variant> >&)>&; _Tuple = std::tuple<sdbus::ObjectPath, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_stri ng<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > >, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<const std::c xx11::basic_string<char, std::char_traits, std::allocator >, sdbus::Variant> > > > > > >&]’ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:634:25: required from ‘void sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::map<std::__cxx11::basic_string, std::map<std::cxx11::basic_string, sdbus::Variant> >&)>]’ /usr/local/include/sdbus-c++/StandardInterfaces.h:158:30: required from here /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: inconsistent deduction for auto return type: ‘void’ and then ‘std::tuple<>’ /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: return-statement with a value, in function returning ‘void’ [-fpermissive] /usr/local/include/sdbus-c++/TypeTraits.h: In instantiation of ‘constexpr decltype(auto) sdbus::detail::apply_impl(_Function&&, _Tuple&&, std::index_sequence<_I ...>) [with _Function = const sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::vector<std::__cxx11::basic_string

&)>&; _Tuple = std::tuple<sdbus::ObjectPath, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >&; long unsigned int ..._I = {0, 1}; std::index_sequenc e<_I ...> = std::integer_sequence<long unsigned int, 0, 1>]’: /usr/local/include/sdbus-c++/TypeTraits.h:553:34: required from ‘constexpr decltype(auto) sdbus::apply(_Function&&, _Tuple&&) [with _Function = const sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::vector<std::cxx11::basic_string &)>&; _Tuple = std::tuple<sdbus::ObjectPath, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > >&]’ /usr/local/include/sdbus-c++/ConvenienceApiClasses.inl:634:25: required from ‘void sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::<lambda(const sdbus::ObjectPath&, const std::vector<std::cxx11::basic_string &)>]’ /usr/local/include/sdbus-c++/StandardInterfaces.h:167:30: required from here /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: inconsistent deduction for auto return type: ‘void’ and then ‘std::tuple<>’ /usr/local/include/sdbus-c++/TypeTraits.h:544:107: error: return-statement with a value, in function returning ‘void’ [-fpermissive] In file included from /usr/include/c++/8/functional:59, from /usr/local/include/sdbus-c++/TypeTraits.h:35, from /usr/local/include/sdbus-c++/Message.h:30, from /usr/local/include/sdbus-c++/ConvenienceApiClasses.h:30, from /usr/local/include/sdbus-c++/IObject.h:30, from /usr/local/include/sdbus-c++/sdbus-c++.h:28, from ../src/main.cpp:1: /usr/include/c++/8/bits/std_function.h: At global scope: /usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::Properties_proxy::Properties_proxy(sdbus::IProxy&)::<lambda(const string&, const std::map<std::__cxx11::basic_string, sdbus::Variant>&, const std::vector<std::__cxx11::basic_string &)>]::<lambda(sdbus::Signal&)>; = void;

= void; _Res = void; _ArgTypes = {sdbus::Signal&}]’, declared using local type ‘sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::Propertie s_proxy::Properties_proxy(sdbus::IProxy&)::, sdbus::Variant>&, const std::vector &)>]::’, is used but never defined [-fpermissive] function<_Res(_ArgTypes...)>:: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::, std::map, sdbus::Variant> &)>]::; = void; = void; _Res = void; _ArgTypes = {sdbus::Signal&}]’, declared using local type ‘sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::Ob jectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::, std::map, sdbus::Variant> &)>]::’, is used but never defined [-fpermissive] /usr/include/c++/8/bits/std_function.h:666:7: error: ‘std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&):: &)>]::; = void; = void; _Res = void; _ArgTypes = {sdbus::Signal&}]’, declared using local type ‘sdbus::SignalSubscriber::call(_Function&&) [with _Function = sdbus::ObjectManager_proxy::ObjectManager_proxy(sdbus::IProxy&)::< lambda(const sdbus::ObjectPath&, const std::vector &)>]::’, is used but never defined [-fpermissive] ninja: build stopped: subcommand failed. What am I missing here?

Thanks, Martin

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kistler-Group/sdbus-cpp/issues/98, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABM3OUVZRULZYQ5DDIMRNZLRNAMBXANCNFSM4MKST4FA .

mnsgs commented 4 years ago

Thanks, @sangelovic I noticed - just closed the issue