File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
#include " ../exercise.h"
2
2
#include < string>
3
3
4
+ // READ: 字符串 <https://zh.cppreference.com/w/cpp/string/basic_string>
5
+
4
6
int main (int argc, char **argv) {
5
- ASSERT (false , " todo!" );
7
+ // READ: 字符串字面量 <https://zh.cppreference.com/w/cpp/string/basic_string/operator%22%22s>
8
+ using namespace std ::string_literals;
9
+ auto hello = " Hello" s;
10
+ auto world = " world" ;
11
+ // READ: `decltype` 表达式 <https://zh.cppreference.com/w/cpp/language/decltype>
12
+ // READ: `std::is_same_v` 元编程判别 <https://zh.cppreference.com/w/cpp/types/is_same>
13
+ ASSERT ((std::is_same_v<decltype (hello), ?>), " Fill in the missing type." );
14
+ ASSERT ((std::is_same_v<decltype (world), ?>), " Fill in the missing type." );
15
+ // TODO: 将 `?` 替换为正确的字符串
16
+ ASSERT (hello + " , " + world + ' !' == " ?" , " Fill in the missing string." );
6
17
return 0 ;
7
18
}
You can’t perform that action at this time.
0 commit comments