Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [haiken@localhost live-video-sync]$ make clean all
- rm -f *.o *.gch *.dSYM core *.core vgcore.* main live-video-sync
- g++ -std=c++11 -Wall -pthread -c -o projector.o projector.cpp
- g++ -std=c++11 -Wall -pthread -c -o terminal.o terminal.cpp
- g++ -std=c++11 -Wall -pthread -c -o main.o main.cpp
- main.cpp: In function ‘int main(int, char**)’:
- main.cpp:114:57: error: invalid use of non-static member function ‘std::__cxx11::string Projector::Power(bool)’
- threads.push_back(thread(projectors.at(0)->Power, true));
- ^
- In file included from main.cpp:29:
- projector.hpp:36:9: note: declared here
- string Power(bool state);
- ^~~~~
- main.cpp:150:20: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Projector*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
- for (int i = 0; i < projectors.size(); i++)
- ~~^~~~~~~~~~~~~~~~~~~
- make: *** [Makefile:12: main.o] Error 1
- [haiken@localhost live-video-sync]$ make clean all
- rm -f *.o *.gch *.dSYM core *.core vgcore.* main live-video-sync
- g++ -std=c++11 -Wall -pthread -c -o projector.o projector.cpp
- g++ -std=c++11 -Wall -pthread -c -o terminal.o terminal.cpp
- g++ -std=c++11 -Wall -pthread -c -o main.o main.cpp
- main.cpp: In member function ‘int LVS::main(int, char**)’:
- main.cpp:115:48: error: ISO C++ forbids taking the address of a bound member function to form a pointer to member function. Say ‘&Projector::Power’ [-fpermissive]
- threads.push_back(thread(&projectors.at(0)->Power, true, this));
- ^~~~~
- main.cpp:151:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<Projector*>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
- for (int i = 0; i < projectors.size(); i++)
- ~~^~~~~~~~~~~~~~~~~~~
- In file included from main.cpp:27:
- /usr/include/c++/8/thread: In instantiation of ‘std::thread::thread(_Callable&&, _Args&& ...) [with _Callable = std::__cxx11::basic_string<char> (Projector::*)(bool); _Args = {bool, LVS*}; <template-parameter-1-3> = void]’:
- main.cpp:115:65: required from here
- /usr/include/c++/8/thread:120:17: error: static assertion failed: std::thread arguments must be invocable after conversion to rvalues
- static_assert( __is_invocable<typename decay<_Callable>::type,
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- typename decay<_Args>::type...>::value,
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /usr/include/c++/8/thread: In instantiation of ‘struct std::thread::_Invoker<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >’:
- /usr/include/c++/8/thread:132:22: required from ‘std::thread::thread(_Callable&&, _Args&& ...) [with _Callable = std::__cxx11::basic_string<char> (Projector::*)(bool); _Args = {bool, LVS*}; <template-parameter-1-3> = void]’
- main.cpp:115:65: required from here
- /usr/include/c++/8/thread:250:2: error: no matching function for call to ‘std::thread::_Invoker<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >::_M_invoke(std::thread::_Invoker<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >::_Indices)’
- operator()()
- ^~~~~~~~
- /usr/include/c++/8/thread:241:4: note: candidate: ‘template<long unsigned int ..._Ind> decltype (std::__invoke((_S_declval<_Ind>)()...)) std::thread::_Invoker<_Tuple>::_M_invoke(std::_Index_tuple<_Ind ...>) [with long unsigned int ..._Ind = {_Ind ...}; _Tuple = std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*>]’
- _M_invoke(_Index_tuple<_Ind...>)
- ^~~~~~~~~
- /usr/include/c++/8/thread:241:4: note: template argument deduction/substitution failed:
- /usr/include/c++/8/thread: In substitution of ‘template<long unsigned int ..._Ind> decltype (std::__invoke(_S_declval<_Ind>()...)) std::thread::_Invoker<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >::_M_invoke<_Ind ...>(std::_Index_tuple<_Ind ...>) [with long unsigned int ..._Ind = {0, 1, 2}]’:
- /usr/include/c++/8/thread:250:2: required from ‘struct std::thread::_Invoker<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >’
- /usr/include/c++/8/thread:132:22: required from ‘std::thread::thread(_Callable&&, _Args&& ...) [with _Callable = std::__cxx11::basic_string<char> (Projector::*)(bool); _Args = {bool, LVS*}; <template-parameter-1-3> = void]’
- main.cpp:115:65: required from here
- /usr/include/c++/8/thread:243:29: error: no matching function for call to ‘__invoke(std::__tuple_element_t<0, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >, std::__tuple_element_t<1, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >, std::__tuple_element_t<2, std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >)’
- -> decltype(std::__invoke(_S_declval<_Ind>()...))
- ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
- In file included from /usr/include/c++/8/tuple:41,
- from /usr/include/c++/8/bits/unique_ptr.h:37,
- from /usr/include/c++/8/memory:80,
- from /usr/include/c++/8/thread:39,
- from main.cpp:27:
- /usr/include/c++/8/bits/invoke.h:89:5: note: candidate: ‘template<class _Callable, class ... _Args> constexpr typename std::__invoke_result<_Functor, _ArgTypes>::type std::__invoke(_Callable&&, _Args&& ...)’
- __invoke(_Callable&& __fn, _Args&&... __args)
- ^~~~~~~~
- /usr/include/c++/8/bits/invoke.h:89:5: note: template argument deduction/substitution failed:
- /usr/include/c++/8/bits/invoke.h: In substitution of ‘template<class _Callable, class ... _Args> constexpr typename std::__invoke_result<_Functor, _ArgTypes>::type std::__invoke(_Callable&&, _Args&& ...) [with _Callable = std::__cxx11::basic_string<char> (Projector::*)(bool); _Args = {bool, LVS*}]’:
- /usr/include/c++/8/thread:243:29: required by substitution of ‘template<long unsigned int ..._Ind> decltype (std::__invoke(_S_declval<_Ind>()...)) std::thread::_Invoker<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >::_M_invoke<_Ind ...>(std::_Index_tuple<_Ind ...>) [with long unsigned int ..._Ind = {0, 1, 2}]’
- /usr/include/c++/8/thread:250:2: required from ‘struct std::thread::_Invoker<std::tuple<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > (Projector::*)(bool), bool, LVS*> >’
- /usr/include/c++/8/thread:132:22: required from ‘std::thread::thread(_Callable&&, _Args&& ...) [with _Callable = std::__cxx11::basic_string<char> (Projector::*)(bool); _Args = {bool, LVS*}; <template-parameter-1-3> = void]’
- main.cpp:115:65: required from here
- /usr/include/c++/8/bits/invoke.h:89:5: error: no type named ‘type’ in ‘struct std::__invoke_result<std::__cxx11::basic_string<char> (Projector::*)(bool), bool, LVS*>’
- make: *** [Makefile:12: main.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement