foo.cc: In member function 'void Server::tick(int)':
foo.cc:89:34: error: use of 'auto' in lambda parameter declaration only available with '-std=c++14' or '-std=gnu++14'
89 | auto check = [=](auto& cur_file) {
| ^~~~
foo.cc: In lambda function:
foo.cc:90:38: error: request for member 'remainingSize' in 'cur_file', which is of non-class type 'int'
90 | if (cur_file.remainingSize < deltaFlux) {
| ^~~~~~~~~~~~~
foo.cc:91:48: error: request for member 'user' in 'cur_file', which is of non-class type 'int'
91 | users[cur_file.user].userState = "scan";
| ^~~~
foo.cc:92:46: error: request for member 'father_node' in 'cur_file', which is of non-class type 'int'
92 | if (cur_file.father_node != nullptr) {
| ^~~~~~~~~~~
foo.cc:93:50: error: request for member 'father_node' in 'cur_file', which is of non-class type 'int'
93 | cur_file.father_node->addSubFile(cur_file.file);
| ^~~~~~~~~~~
foo.cc:93:83: error: request for member 'file' in 'cur_file', which is of non-class type 'int'
93 | cur_file.father_node->addSubFile(cur_file.file);
| ^~~~
foo.cc:94:50: error: request for member 'father_node' in 'cur_file', which is of non-class type 'int'
94 | cur_file.father_node->finishUploading();
| ^~~~~~~~~~~
foo.cc:98:42: error: request for member 'remainingSize' in 'cur_file', which is of non-class type 'int'
98 | cur_file.remainingSize -= deltaFlux;
| ^~~~~~~~~~~~~
foo.cc: In member function 'bool Server::connect(std::string, int)':
foo.cc:121:34: warning: comparison of integer expressions of different signedness: 'std::map<std::__cxx11::basic_string<char>, User>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
121 | if (users.size() > maxUserNumber) return false;
| ~~~~~~~~~~~~~^~~~~~~~~~~~~~~
In file included from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/stl_algobase.h:71,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/string:50,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/locale_classes.h:40,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/ios_base.h:41,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/ios:42,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/istream:38,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/sstream:38,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/complex:45,
from /nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/ccomplex:39,
from stdc++.h:54:
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_pred<_Predicate>::operator()(_Iterator) [with _Iterator = std::_List_iterator<Server::TransingFile>; _Predicate = Server::tick(int)::<lambda(int&)>]':
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/stl_algobase.h:2140:13: required from '_ForwardIterator std::__remove_if(_ForwardIterator, _ForwardIterator, _Predicate) [with _ForwardIterator = _List_iterator<Server::TransingFile>; _Predicate = __gnu_cxx::__ops::_Iter_pred<Server::tick(int)::<lambda(int&)> >]'
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/stl_algo.h:877:30: required from '_FIter std::remove_if(_FIter, _FIter, _Predicate) [with _FIter = _List_iterator<Server::TransingFile>; _Predicate = Server::tick(int)::<lambda(int&)>]'
foo.cc:103:37: required from here
/nix/store/h5kvfrjmpw792v8jg7nrzfkffmn0iyy8-gcc-12.3.0/include/c++/12.3.0/bits/predefined_ops.h:318:30: error: no match for call to '(Server::tick(int)::<lambda(int&)>) (Server::TransingFile&)'
318 | { return bool(_M_pred(*__it)); }
| ~~~~~~~^~~~~~~
foo.cc:89:30: note: candidate: 'Server::tick(int)::<lambda(int&)>'
89 | auto check = [=](auto& cur_file) {
| ^
foo.cc:89:30: note: no known conversion for argument 1 from 'Server::TransingFile' to 'int&'
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务