From 1b9fcfa6d18ed50e7ed126ea578c6d3ad8f3f9c5 Mon Sep 17 00:00:00 2001 From: Linus Wagner Date: Mon, 13 Nov 2023 15:52:21 +0100 Subject: [PATCH] add some more examples --- src/test/declTypes.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/test/declTypes.cpp b/src/test/declTypes.cpp index c25d1aa5..7cd89812 100644 --- a/src/test/declTypes.cpp +++ b/src/test/declTypes.cpp @@ -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; @@ -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();