Tinginiai
- [1] 2022-12-02 22:31 (67.7)
- [2] 2022-12-02 22:32 (100)
- [3] 2022-12-02 22:33 (100)
- [4] 2022-12-03 17:18 (0)
- [5] 2022-12-03 17:20 (100)
Taškai: 0
Compile: FAIL
tinginiai.cpp: In function ‘int main()’: tinginiai.cpp:37:48: error: use of ‘auto’ in lambda parameter declaration only available with -std=c++14 or -std=gnu++14 int tuscia = count_if(v.begin(), v.end(), [](auto a) ^ tinginiai.cpp: In lambda function: tinginiai.cpp:39:17: error: request for member ‘size’ in ‘a’, which is of non-class type ‘int’ return (a.size() == 0); ^ In file included from /usr/include/c++/5/bits/stl_algobase.h:71:0, from /usr/include/c++/5/bits/char_traits.h:39, from /usr/include/c++/5/ios:40, from /usr/include/c++/5/ostream:38, from /usr/include/c++/5/iostream:39, from tinginiai.cpp:1: /usr/include/c++/5/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; _Predicate = main()::<lambda(int)>]’: /usr/include/c++/5/bits/stl_algo.h:3193:12: required from ‘typename std::iterator_traits<_Iterator>::difference_type std::__count_if(_InputIterator, _InputIterator, _Predicate) [with _InputIterator = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; _Predicate = __gnu_cxx::__ops::_Iter_pred<main()::<lambda(int)> >; typename std::iterator_traits<_Iterator>::difference_type = long int]’ /usr/include/c++/5/bits/stl_algo.h:3990:29: required from ‘typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate) [with _IIter = __gnu_cxx::__normal_iterator<std::vector<int>*, std::vector<std::vector<int> > >; _Predicate = main()::<lambda(int)>; typename std::iterator_traits<_Iterator>::difference_type = long int]’ tinginiai.cpp:40:6: required from here /usr/include/c++/5/bits/predefined_ops.h:234:30: error: no match for call to ‘(main()::<lambda(int)>) (std::vector<int>&)’ { return bool(_M_pred(*__it)); } ^ /usr/include/c++/5/bits/predefined_ops.h:234:30: note: candidate: void (*)(int) <conversion> /usr/include/c++/5/bits/predefined_ops.h:234:30: note: candidate expects 2 arguments, 2 provided tinginiai.cpp:37:54: note: candidate: main()::<lambda(int)> int tuscia = count_if(v.begin(), v.end(), [](auto a) ^ tinginiai.cpp:37:54: note: no known conversion for argument 1 from ‘std::vector<int>’ to ‘int’
nr. | result | time | message |
---|