Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stdout:
- TMP=$(pwd) g++-8 -std=c++17 -O0 -Wall -Wextra -Werror -o ./solution *.cpp
- makefile:3: recipe for target 'build' failed
- stderr:
- source.cpp: In member function ‘bool String::operator==(const String&)’:
- source.cpp:75:31: error: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Werror=sign-compare]
- for (int i = 0; i < this->sz; ++i) {
- ~~^~~~~~~~~~
- cc1plus: all warnings being treated as errors
- string_test.cpp: In function ‘void test1()’:
- string_test.cpp:12:5: error: ‘String’ was not declared in this scope
- String s("abcdef");
- ^~~~~~
- string_test.cpp:12:5: note: suggested alternative: ‘stdin’
- String s("abcdef");
- ^~~~~~
- stdin
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:13:12: error: ‘s’ was not declared in this scope
- assert(s.length() == 6);
- ^
- string_test.cpp: In function ‘void test2()’:
- string_test.cpp:29:11: error: ‘String’ does not name a type; did you mean ‘stdin’?
- const String s("abcdef");
- ^~~~~~
- stdin
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:30:12: error: ‘s’ was not declared in this scope
- assert(s.length() == 6);
- ^
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~~~
- string_test.cpp:36:62: error: ‘String’ was not declared in this scope
- string_test.cpp:36:62: note: suggested alternative: ‘stdin’
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:36:62: error: expected ‘>’ before ‘String’
- string_test.cpp:36:62: error: expected ‘(’ before ‘String’
- string_test.cpp:36:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^
- string_test.cpp:36:86: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:36:62: error: expected ‘>’ before ‘String’
- string_test.cpp:36:62: error: expected ‘(’ before ‘String’
- string_test.cpp:36:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^
- string_test.cpp:36:86: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:36:62: error: expected ‘>’ before ‘String’
- string_test.cpp:36:62: error: expected ‘(’ before ‘String’
- string_test.cpp:36:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^
- string_test.cpp:36:86: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:36:62: error: expected ‘>’ before ‘String’
- string_test.cpp:36:62: error: expected ‘(’ before ‘String’
- string_test.cpp:36:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^
- string_test.cpp:36:86: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:36:62: error: expected ‘>’ before ‘String’
- string_test.cpp:36:62: error: expected ‘(’ before ‘String’
- string_test.cpp:36:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^
- string_test.cpp:36:86: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:36:62: error: expected ‘>’ before ‘String’
- string_test.cpp:36:62: error: expected ‘(’ before ‘String’
- string_test.cpp:36:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^
- string_test.cpp:36:86: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~~~
- string_test.cpp:36:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:36:62: error: expected ‘>’ before ‘String’
- string_test.cpp:36:62: error: expected ‘(’ before ‘String’
- string_test.cpp:36:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^
- string_test.cpp:36:86: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~
- string_test.cpp:36:19: error: parse error in template argument list
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String())[0]), char>));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- string_test.cpp:36:19: error: wrong number of template arguments (1, should be 2)
- In file included from /usr/include/c++/8/bits/move.h:55,
- from /usr/include/c++/8/bits/stl_pair.h:59,
- from /usr/include/c++/8/bits/stl_algobase.h:64,
- from /usr/include/c++/8/bits/char_traits.h:39,
- from /usr/include/c++/8/string:40,
- from string_test.cpp:4:
- /usr/include/c++/8/type_traits:2817:25: note: provided for ‘template<class _Tp, class _Up> constexpr const bool std::is_assignable_v<_Tp, _Up>’
- inline constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value;
- ^~~~~~~~~~~~~~~
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:37:62: error: expected ‘>’ before ‘String’
- string_test.cpp:37:62: error: expected ‘(’ before ‘String’
- string_test.cpp:37:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^
- string_test.cpp:37:91: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:37:62: error: expected ‘>’ before ‘String’
- string_test.cpp:37:62: error: expected ‘(’ before ‘String’
- string_test.cpp:37:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^
- string_test.cpp:37:91: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:37:62: error: expected ‘>’ before ‘String’
- string_test.cpp:37:62: error: expected ‘(’ before ‘String’
- string_test.cpp:37:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^
- string_test.cpp:37:91: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:37:62: error: expected ‘>’ before ‘String’
- string_test.cpp:37:62: error: expected ‘(’ before ‘String’
- string_test.cpp:37:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^
- string_test.cpp:37:91: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:37:62: error: expected ‘>’ before ‘String’
- string_test.cpp:37:62: error: expected ‘(’ before ‘String’
- string_test.cpp:37:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^
- string_test.cpp:37:91: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:37:62: error: expected ‘>’ before ‘String’
- string_test.cpp:37:62: error: expected ‘(’ before ‘String’
- string_test.cpp:37:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^
- string_test.cpp:37:91: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~~~
- string_test.cpp:37:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:37:62: error: expected ‘>’ before ‘String’
- string_test.cpp:37:62: error: expected ‘(’ before ‘String’
- string_test.cpp:37:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^
- string_test.cpp:37:91: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~
- string_test.cpp:37:19: error: parse error in template argument list
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).front()), char>));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- string_test.cpp:37:19: error: wrong number of template arguments (1, should be 2)
- In file included from /usr/include/c++/8/bits/move.h:55,
- from /usr/include/c++/8/bits/stl_pair.h:59,
- from /usr/include/c++/8/bits/stl_algobase.h:64,
- from /usr/include/c++/8/bits/char_traits.h:39,
- from /usr/include/c++/8/string:40,
- from string_test.cpp:4:
- /usr/include/c++/8/type_traits:2817:25: note: provided for ‘template<class _Tp, class _Up> constexpr const bool std::is_assignable_v<_Tp, _Up>’
- inline constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value;
- ^~~~~~~~~~~~~~~
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:38:62: error: expected ‘>’ before ‘String’
- string_test.cpp:38:62: error: expected ‘(’ before ‘String’
- string_test.cpp:38:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^
- string_test.cpp:38:90: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:38:62: error: expected ‘>’ before ‘String’
- string_test.cpp:38:62: error: expected ‘(’ before ‘String’
- string_test.cpp:38:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^
- string_test.cpp:38:90: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:38:62: error: expected ‘>’ before ‘String’
- string_test.cpp:38:62: error: expected ‘(’ before ‘String’
- string_test.cpp:38:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^
- string_test.cpp:38:90: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:38:62: error: expected ‘>’ before ‘String’
- string_test.cpp:38:62: error: expected ‘(’ before ‘String’
- string_test.cpp:38:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^
- string_test.cpp:38:90: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:38:62: error: expected ‘>’ before ‘String’
- string_test.cpp:38:62: error: expected ‘(’ before ‘String’
- string_test.cpp:38:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^
- string_test.cpp:38:90: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:38:62: error: expected ‘>’ before ‘String’
- string_test.cpp:38:62: error: expected ‘(’ before ‘String’
- string_test.cpp:38:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^
- string_test.cpp:38:90: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~~~
- string_test.cpp:38:62: error: ISO C++ forbids declaration of ‘type name’ with no type [-fpermissive]
- string_test.cpp:38:62: error: expected ‘>’ before ‘String’
- string_test.cpp:38:62: error: expected ‘(’ before ‘String’
- string_test.cpp:38:69: error: expected primary-expression before ‘>’ token
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^
- string_test.cpp:38:90: error: expected primary-expression before ‘char’
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~
- string_test.cpp:38:19: error: parse error in template argument list
- assert((!std::is_assignable_v<decltype(static_cast<const String&>(String()).back()), char>));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- string_test.cpp:38:19: error: wrong number of template arguments (1, should be 2)
- In file included from /usr/include/c++/8/bits/move.h:55,
- from /usr/include/c++/8/bits/stl_pair.h:59,
- from /usr/include/c++/8/bits/stl_algobase.h:64,
- from /usr/include/c++/8/bits/char_traits.h:39,
- from /usr/include/c++/8/string:40,
- from string_test.cpp:4:
- /usr/include/c++/8/type_traits:2817:25: note: provided for ‘template<class _Tp, class _Up> constexpr const bool std::is_assignable_v<_Tp, _Up>’
- inline constexpr bool is_assignable_v = is_assignable<_Tp, _Up>::value;
- ^~~~~~~~~~~~~~~
- string_test.cpp: In function ‘void test3()’:
- string_test.cpp:42:5: error: ‘String’ was not declared in this scope
- String s("aaa");
- ^~~~~~
- string_test.cpp:42:5: note: suggested alternative: ‘stdin’
- String s("aaa");
- ^~~~~~
- stdin
- string_test.cpp:44:9: error: ‘s’ was not declared in this scope
- s.push_back('a');
- ^
- string_test.cpp:48:15: error: expected ‘;’ before ‘ss’
- String ss = s;
- ^~~
- ;
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:49:16: error: ‘ss’ was not declared in this scope
- assert(ss.length() == 500'003);
- ^~
- string_test.cpp:50:16: error: ‘s’ was not declared in this scope
- assert(s[500'000] == 'a');
- ^
- string_test.cpp:53:12: error: ‘s’ was not declared in this scope
- assert(s.length() == 500'003);
- ^
- string_test.cpp:57:11: error: expected ‘;’ before ‘ss’
- String ss = s;
- ^~~
- ;
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:64:12: error: ‘ss’ was not declared in this scope
- assert(ss.length() == 500'003);
- ^~
- string_test.cpp:72:15: error: ‘String’ does not name a type; did you mean ‘stdin’?
- const String sss(1000, 'a');
- ^~~~~~
- stdin
- string_test.cpp:73:15: error: expected ‘;’ before ‘sz’
- String sz = sss;
- ^~~
- ;
- string_test.cpp:74:14: error: ‘sz’ was not declared in this scope
- s += sz.back();
- ^~
- string_test.cpp: In function ‘void test4()’:
- string_test.cpp:101:5: error: ‘String’ was not declared in this scope
- String s;
- ^~~~~~
- string_test.cpp:101:5: note: suggested alternative: ‘stdin’
- String s;
- ^~~~~~
- stdin
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:102:12: error: ‘s’ was not declared in this scope
- assert(s.empty());
- ^
- string_test.cpp:107:11: error: expected ‘;’ before ‘ss’
- String ss;
- ^~~
- ;
- string_test.cpp:108:12: error: ‘ss’ was not declared in this scope
- iss >> ss;
- ^~
- string_test.cpp:108:12: note: suggested alternative: ‘iss’
- iss >> ss;
- ^~
- iss
- string_test.cpp: In function ‘void test5()’:
- string_test.cpp:128:5: error: ‘String’ was not declared in this scope
- String s = "abcde";
- ^~~~~~
- string_test.cpp:128:5: note: suggested alternative: ‘stdin’
- String s = "abcde";
- ^~~~~~
- stdin
- string_test.cpp:130:16: error: ‘s’ was not declared in this scope
- auto& ss = s += 'f';
- ^
- string_test.cpp:130:16: note: suggested alternative: ‘ss’
- auto& ss = s += 'f';
- ^
- ss
- string_test.cpp:143:20: error: unable to deduce ‘auto’ from ‘ss’
- auto sss = ss;
- ^~
- string_test.cpp: In function ‘void test6()’:
- string_test.cpp:151:11: error: ‘String’ does not name a type; did you mean ‘stdin’?
- const String s = "122333444455555";
- ^~~~~~
- stdin
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:154:12: error: ‘s’ was not declared in this scope
- assert(s.find("44") == 6);
- ^
- string_test.cpp:157:47: error: ‘String’ was not declared in this scope
- assert(s.find("12345") == (std::is_same_v<String, std::string> ? std::string::npos : s.length()));
- ^~~~~~
- string_test.cpp:157:47: note: suggested alternative: ‘stdin’
- string_test.cpp:157:37: error: template argument 1 is invalid
- assert(s.find("12345") == (std::is_same_v<String, std::string> ? std::string::npos : s.length()));
- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- string_test.cpp:162:9: error: invalid types ‘int[int]’ for array subscript
- ss[0] = '0';
- ^
- string_test.cpp:166:10: error: invalid types ‘int[int]’ for array subscript
- sss[0] = '2';
- ^
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:167:16: error: invalid types ‘int[int]’ for array subscript
- assert(ss[0] == '2');
- ^
- string_test.cpp:170:10: error: request for member ‘front’ in ‘ssss’, which is of non-class type ‘int’
- ssss.front() = '3';
- ^~~~~
- In file included from /usr/include/c++/8/cassert:44,
- from string_test.cpp:3:
- string_test.cpp:171:15: error: request for member ‘front’ in ‘ss’, which is of non-class type ‘int’
- assert(ss.front() == '3');
- ^~~~~
- make: *** [build] Error 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement