SHARE
TWEET

Untitled

a guest Sep 19th, 2019 103 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /home/user/Projects/expression-parsing/main.cpp: In member function ‘std::unique_ptr<node> parser::parse_additive(std::deque<token>&)’:
  2. /home/user/Projects/expression-parsing/main.cpp:485:93: error: no matching function for call to ‘make_unique<node>(sum_node)’
  3.   485 |                 node = std::make_unique<node>(sum_node(*node, *parse_multiplicative(tokens)));
  4.       |                                                                                             ^
  5. In file included from /usr/include/c++/9.1.0/memory:80,
  6.                  from /home/user/Projects/expression-parsing/main.cpp:11:
  7. /usr/include/c++/9.1.0/bits/unique_ptr.h:852:5: note: candidate: ‘template<class _Tp, class ... _Args> typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...)’
  8.   852 |     make_unique(_Args&&... __args)
  9.       |     ^~~~~~~~~~~
  10. /usr/include/c++/9.1.0/bits/unique_ptr.h:852:5: note:   template argument deduction/substitution failed:
  11. /usr/include/c++/9.1.0/bits/unique_ptr.h:858:5: note: candidate: ‘template<class _Tp> typename std::_MakeUniq<_Tp>::__array std::make_unique(std::size_t)’
  12.   858 |     make_unique(size_t __num)
  13.       |     ^~~~~~~~~~~
  14. /usr/include/c++/9.1.0/bits/unique_ptr.h:858:5: note:   template argument deduction/substitution failed:
  15. /usr/include/c++/9.1.0/bits/unique_ptr.h:864:5: note: candidate: ‘template<class _Tp, class ... _Args> typename std::_MakeUniq<_Tp>::__invalid_type std::make_unique(_Args&& ...)’ <deleted>
  16.   864 |     make_unique(_Args&&...) = delete;
  17.       |     ^~~~~~~~~~~
  18. /usr/include/c++/9.1.0/bits/unique_ptr.h:864:5: note:   template argument deduction/substitution failed:
  19. /home/user/Projects/expression-parsing/main.cpp:488:5: warning: no return statement in function returning non-void [-Wreturn-type]
  20.   488 |     }
  21.       |     ^
  22. In file included from /usr/include/c++/9.1.0/memory:80,
  23.                  from /home/user/Projects/expression-parsing/main.cpp:11:
  24. /usr/include/c++/9.1.0/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = node; _Args = {const node&}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<node>]’:
  25. /home/user/Projects/expression-parsing/main.cpp:422:141:   required from here
  26. /usr/include/c++/9.1.0/bits/unique_ptr.h:853:30: error: invalid new-expression of abstract class type ‘node’
  27.   853 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
  28.       |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  29. /home/user/Projects/expression-parsing/main.cpp:403:8: note:   because the following virtual functions are pure within ‘node’:
  30.   403 | struct node {
  31.       |        ^~~~
  32. /home/user/Projects/expression-parsing/main.cpp:405:20: note:   ‘virtual number node::compute()’
  33.   405 |     virtual number compute() = 0;
  34.       |                    ^~~~~~~
  35. In file included from /usr/include/c++/9.1.0/memory:80,
  36.                  from /home/user/Projects/expression-parsing/main.cpp:11:
  37. /usr/include/c++/9.1.0/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = node; _Args = {number_node}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<node>]’:
  38. /home/user/Projects/expression-parsing/main.cpp:455:63:   required from here
  39. /usr/include/c++/9.1.0/bits/unique_ptr.h:853:30: error: invalid new-expression of abstract class type ‘node’
  40.   853 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
  41.       |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  42. /usr/include/c++/9.1.0/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = node; _Args = {call_node}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<node>]’:
  43. /home/user/Projects/expression-parsing/main.cpp:463:109:   required from here
  44. /usr/include/c++/9.1.0/bits/unique_ptr.h:853:30: error: invalid new-expression of abstract class type ‘node’
  45. make[3]: *** [CMakeFiles/expression_parsing.dir/build.make:63: CMakeFiles/expression_parsing.dir/main.cpp.o] Error 1
  46. make[2]: *** [CMakeFiles/Makefile2:76: CMakeFiles/expression_parsing.dir/all] Error 2
  47. make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/expression_parsing.dir/rule] Error 2
  48. make: *** [Makefile:118: expression_parsing] Error 2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top