Skip to content

Commit

Permalink
add some more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Wagner committed Nov 13, 2023
1 parent 3cfc4e4 commit 1b9fcfa
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/test/declTypes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@

class Person {
static int F;
int hello() {
return F;
}
public:
static int G;
static int static_method() {
return F;
}
};


Person p;
decltype(p) q = p;

Expand All @@ -19,6 +22,8 @@ P qq;

decltype(qq) x;

int some_f = decltype(p)::G;



int some_number = 5;
decltype(some_number) double_the_number = some_number * 2;
int a = decltype(p)::static_method();

0 comments on commit 1b9fcfa

Please sign in to comment.