FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppfront/regression-tests/mixed-string-interpolation.cpp2 at main · clayne/cppfront · GitHub
clayne
/
cppfront
Public
forked from
hsutter/cppfront
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cppfront
/
regression-tests
/
mixed-string-interpolation.cpp2
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (41 loc) · 1.62 KB
Breadcrumbs
cppfront
/
regression-tests
/
mixed-string-interpolation.cpp2
Copy path
File metadata and controls
53 lines (41 loc) · 1.62 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#include <iostream>
#include <string_view>
#include <utility>
#include <tuple>
struct custom_struct_with_no_stringize_customization { } custom;
main: () -> int = {
a := 2;
b: std::optional<int> = ();
std::cout << "a = (a)$, b = (b)$\n";
b = 42;
std::cout << "a^2 + b = (a * a + b.value())$\n";
sv: std::string_view = "my string_view";
std::cout << "sv = (sv)$\n";
osv: std::optional<std::string_view> = ();
std::cout << "osv = (osv)$\n";
osv = "string literal bound to optional string_view";
std::cout << "osv = (osv)$\n";
var: std::variant<std::monostate, std::string, double> = ();
std::cout << "var = (var)$\n";
var = "abracadabra";
std::cout << "var = (var)$\n";
var = 2.71828;
std::cout << "var = (var)$\n";
mypair: std::pair<int, double> = (12, 3.4);
std::cout << "mypair = (mypair)$\n";
tup1: std::tuple<int> = (12);
tup2: std::tuple<int, double> = (12, 3.4);
tup3: std::tuple<int, double, std::string> = (12, 3.4, "456");
std::cout << "tup1 = (tup1)$\n";
std::cout << "tup2 = (tup2)$\n";
std::cout << "tup3 = (tup3)$\n";
p: std::pair<std::string_view, std::optional<std::string>> = ("first", std::nullopt);
std::cout << "p = (p)$\n";
t: std::tuple<double, std::optional<std::pair<std::string_view, int>>, std::optional<std::tuple<int, int, int>>> = (3.14, std::nullopt, std::nullopt);
std::cout << "t = (t)$\n";
vv: std::variant<int, std::string, std::pair<int, double> > = ();
std::cout << "vv = (vv)$\n";
vv = std::make_pair(1,2.3);
std::cout << "vv = (vv)$\n";
std::cout << "custom = (custom)$\n";
}
Back
|
FazBrowse Home
|
New Git URL