FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cppfront/mixed-fixed-type-aliases.cpp at main · jnorthrup/cppfront · GitHub
jnorthrup
/
cppfront
Public
forked from
hsutter/cppfront
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
8
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cppfront
/
mixed-fixed-type-aliases.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
65 lines (43 loc) · 1.87 KB
Breadcrumbs
cppfront
/
mixed-fixed-type-aliases.cpp
Copy path
File metadata and controls
65 lines (43 loc) · 1.87 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
54
55
56
57
58
59
60
61
62
63
64
#
include
<
filesystem
>
#
include
<
iostream
>
#
include
<
typeinfo
>
//
=== Cpp2 type declarations ====================================================
#
include
"
cpp2util.h
"
#
line
1 "regression-tests/mixed-fixed-type-aliases.cpp2"
#
line
15 "regression-tests/mixed-fixed-type-aliases.cpp2"
template
<
typename
T>
class
mytype
;
//
=== Cpp2 type definitions and function declarations ===========================
#
line
1 "regression-tests/mixed-fixed-type-aliases.cpp2"
#
line
4 "regression-tests/mixed-fixed-type-aliases.cpp2"
namespace
my
{
using
u16
=
float
;
}
#
line
9 "regression-tests/mixed-fixed-type-aliases.cpp2"
auto
test
(
auto
const
& x) -> void;
#
line
15 "regression-tests/mixed-fixed-type-aliases.cpp2"
template
<
typename
T>
class
mytype
{
public:
template
<
typename
U>
static
const
bool
myvalue;
};
[[nodiscard]]
auto
main
(
int
const
argc_,
char
** argv_) -> int;
//
=== Cpp2 function definitions =================================================
#
line
1 "regression-tests/mixed-fixed-type-aliases.cpp2"
#
line
9 "regression-tests/mixed-fixed-type-aliases.cpp2"
auto
test
(
auto
const
& x) -> void{
std::cout
<< cpp2::impl::as_<std::string>(std::is_floating_point_v<
CPP2_TYPEOF
(x)>)
<<
"
\n
"
;
}
#
line
16 "regression-tests/mixed-fixed-type-aliases.cpp2"
template
<
typename
T>
template
<
typename
U>
inline
CPP2_CONSTEXPR
bool
mytype<T>::myvalue{
true
};
#
line
19 "regression-tests/mixed-fixed-type-aliases.cpp2"
[[nodiscard]]
auto
main
(
int
const
argc_,
char
** argv_) -> int{
auto
const
args =
cpp2::make_args
(argc_, argv_);
#
line
20 "regression-tests/mixed-fixed-type-aliases.cpp2"
my::
u16
y {
42
};
test
(
cpp2::move
(y));
cpp2::
u16
z {
42
};
test
(
cpp2::move
(z));
for
(
auto
const
& arg : args )
std::cout <<
CPP2_UFCS
(filename)(
std::filesystem::path
(arg)) <<
"
\n
"
;
std::cout <<
"
"
+
cpp2::to_string
(mytype<
int
>::myvalue<
int
>) +
"
\n
"
;
}
Back
|
FazBrowse Home
|
New Git URL