QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#581414 | #9307. Clock Master | 3un_larryfunc | Compile Error | / | / | C++14 | 49.9kb | 2024-09-22 12:37:56 | 2024-09-22 12:37:57 |
Due to the privacy settings of the submitter, you are not allowed to view this code.
詳細信息
answer.code:183:105: error: ‘requires’ only available with ‘-std=c++20’ or ‘-fconcepts’ 183 | template <class T, size_t size = std::tuple_size<T>::value> std::string to_debug(T, std::string s = "") requires(not std::ranges::range<T>); | ^~~~~~~~ answer.code:183:123: error: ‘std::ranges’ has not been declared 183 | template <class T, size_t size = std::tuple_size<T>::value> std::string to_debug(T, std::string s = "") requires(not std::ranges::range<T>); | ^~~~~~ answer.code:183:138: error: expected primary-expression before ‘>’ token 183 | template <class T, size_t size = std::tuple_size<T>::value> std::string to_debug(T, std::string s = "") requires(not std::ranges::range<T>); | ^ answer.code:183:139: error: expected primary-expression before ‘)’ token 183 | template <class T, size_t size = std::tuple_size<T>::value> std::string to_debug(T, std::string s = "") requires(not std::ranges::range<T>); | ^ answer.code:184:22: warning: use of ‘auto’ in parameter declaration only available with ‘-std=c++20’ or ‘-fconcepts’ 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^~~~ answer.code:184:30: error: ‘requires’ only available with ‘-std=c++20’ or ‘-fconcepts’ 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^~~~~~~~ answer.code:184:60: error: expected primary-expression before ‘&’ token 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^ answer.code:184:62: error: ‘os’ was not declared in this scope; did you mean ‘cos’? 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^~ | cos answer.code:184:39: error: there are no arguments to ‘requires’ that depend on a template parameter, so a declaration of ‘requires’ must be available [-fpermissive] 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^~~~~~~~ answer.code:184:39: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) answer.code: In function ‘std::string to_debug(auto:1)’: answer.code:184:68: error: ‘os’ was not declared in this scope; did you mean ‘cos’? 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^~ | cos answer.code:184:77: warning: no return statement in function returning non-void [-Wreturn-type] 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^ answer.code: At global scope: answer.code:184:79: error: expected unqualified-id before ‘{’ token 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^ answer.code:185:27: error: ‘std::string to_debug’ redeclared as different kind of entity 185 | std::string to_debug(std::ranges::range auto x, std::string s = "") requires(not std::is_same_v<decltype(x), std::string>) { | ^~~~~~ answer.code:184:13: note: previous declaration ‘template<class auto:1> std::string to_debug(auto:1)’ 184 | std::string to_debug(auto x) requires requires(std::ostream& os) { os << x; } { return static_cast<std::ostringstream>(std::ostringstream() << x).str(); } | ^~~~~~~~ answer.code:18...