Advertisement
openaiken

output

Jul 18th, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.46 KB | None | 0 0
  1. [haiken@localhost live-video-sync]$ make clean all
  2. rm -f *.o *.gch *.dSYM core *.core vgcore.* main live-video-sync
  3. g++ -std=c++11 -Wall -pthread -c -o projector.o projector.cpp
  4. g++ -std=c++11 -Wall -pthread -c -o terminal.o terminal.cpp
  5. g++ -std=c++11 -Wall -pthread -c -o main.o main.cpp
  6. main.cpp: In function ‘int main(int, char**)’:
  7. main.cpp:114:57: error: invalid use of non-static member function ‘std::__cxx11::string Projector::Power(bool)’
  8. threads.push_back(thread(projectors.at(0)->Power, true));
  9. ^
  10. In file included from main.cpp:29:
  11. projector.hpp:36:9: note: declared here
  12. string Power(bool state);
  13. ^~~~~
  14. 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]
  15. for (int i = 0; i < projectors.size(); i++)
  16. ~~^~~~~~~~~~~~~~~~~~~
  17. make: *** [Makefile:12: main.o] Error 1
  18. [haiken@localhost live-video-sync]$ make clean all
  19. rm -f *.o *.gch *.dSYM core *.core vgcore.* main live-video-sync
  20. g++ -std=c++11 -Wall -pthread -c -o projector.o projector.cpp
  21. g++ -std=c++11 -Wall -pthread -c -o terminal.o terminal.cpp
  22. g++ -std=c++11 -Wall -pthread -c -o main.o main.cpp
  23. main.cpp: In member function ‘int LVS::main(int, char**)’:
  24. 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]
  25. threads.push_back(thread(&projectors.at(0)->Power, true, this));
  26. ^~~~~
  27. 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]
  28. for (int i = 0; i < projectors.size(); i++)
  29. ~~^~~~~~~~~~~~~~~~~~~
  30. In file included from main.cpp:27:
  31. /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]’:
  32. main.cpp:115:65: required from here
  33. /usr/include/c++/8/thread:120:17: error: static assertion failed: std::thread arguments must be invocable after conversion to rvalues
  34. static_assert( __is_invocable<typename decay<_Callable>::type,
  35. ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  36. typename decay<_Args>::type...>::value,
  37. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  38. /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*> >’:
  39. /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]’
  40. main.cpp:115:65: required from here
  41. /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)’
  42. operator()()
  43. ^~~~~~~~
  44. /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*>]’
  45. _M_invoke(_Index_tuple<_Ind...>)
  46. ^~~~~~~~~
  47. /usr/include/c++/8/thread:241:4: note: template argument deduction/substitution failed:
  48. /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}]’:
  49. /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*> >’
  50. /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]’
  51. main.cpp:115:65: required from here
  52. /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*> >)’
  53. -> decltype(std::__invoke(_S_declval<_Ind>()...))
  54. ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
  55. In file included from /usr/include/c++/8/tuple:41,
  56. from /usr/include/c++/8/bits/unique_ptr.h:37,
  57. from /usr/include/c++/8/memory:80,
  58. from /usr/include/c++/8/thread:39,
  59. from main.cpp:27:
  60. /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&& ...)’
  61. __invoke(_Callable&& __fn, _Args&&... __args)
  62. ^~~~~~~~
  63. /usr/include/c++/8/bits/invoke.h:89:5: note: template argument deduction/substitution failed:
  64. /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*}]’:
  65. /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}]’
  66. /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*> >’
  67. /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]’
  68. main.cpp:115:65: required from here
  69. /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*>’
  70. make: *** [Makefile:12: main.o] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement