Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /home/user/Projects/expression-parsing/main.cpp: In member function ‘std::unique_ptr<node> parser::parse_additive(std::deque<token>&)’:
- /home/user/Projects/expression-parsing/main.cpp:485:93: error: no matching function for call to ‘make_unique<node>(sum_node)’
- 485 | node = std::make_unique<node>(sum_node(*node, *parse_multiplicative(tokens)));
- | ^
- In file included from /usr/include/c++/9.1.0/memory:80,
- from /home/user/Projects/expression-parsing/main.cpp:11:
- /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&& ...)’
- 852 | make_unique(_Args&&... __args)
- | ^~~~~~~~~~~
- /usr/include/c++/9.1.0/bits/unique_ptr.h:852:5: note: template argument deduction/substitution failed:
- /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)’
- 858 | make_unique(size_t __num)
- | ^~~~~~~~~~~
- /usr/include/c++/9.1.0/bits/unique_ptr.h:858:5: note: template argument deduction/substitution failed:
- /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>
- 864 | make_unique(_Args&&...) = delete;
- | ^~~~~~~~~~~
- /usr/include/c++/9.1.0/bits/unique_ptr.h:864:5: note: template argument deduction/substitution failed:
- /home/user/Projects/expression-parsing/main.cpp:488:5: warning: no return statement in function returning non-void [-Wreturn-type]
- 488 | }
- | ^
- In file included from /usr/include/c++/9.1.0/memory:80,
- from /home/user/Projects/expression-parsing/main.cpp:11:
- /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>]’:
- /home/user/Projects/expression-parsing/main.cpp:422:141: required from here
- /usr/include/c++/9.1.0/bits/unique_ptr.h:853:30: error: invalid new-expression of abstract class type ‘node’
- 853 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /home/user/Projects/expression-parsing/main.cpp:403:8: note: because the following virtual functions are pure within ‘node’:
- 403 | struct node {
- | ^~~~
- /home/user/Projects/expression-parsing/main.cpp:405:20: note: ‘virtual number node::compute()’
- 405 | virtual number compute() = 0;
- | ^~~~~~~
- In file included from /usr/include/c++/9.1.0/memory:80,
- from /home/user/Projects/expression-parsing/main.cpp:11:
- /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>]’:
- /home/user/Projects/expression-parsing/main.cpp:455:63: required from here
- /usr/include/c++/9.1.0/bits/unique_ptr.h:853:30: error: invalid new-expression of abstract class type ‘node’
- 853 | { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
- | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- /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>]’:
- /home/user/Projects/expression-parsing/main.cpp:463:109: required from here
- /usr/include/c++/9.1.0/bits/unique_ptr.h:853:30: error: invalid new-expression of abstract class type ‘node’
- make[3]: *** [CMakeFiles/expression_parsing.dir/build.make:63: CMakeFiles/expression_parsing.dir/main.cpp.o] Error 1
- make[2]: *** [CMakeFiles/Makefile2:76: CMakeFiles/expression_parsing.dir/all] Error 2
- make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/expression_parsing.dir/rule] Error 2
- make: *** [Makefile:118: expression_parsing] Error 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement