update example
This commit is contained in:
parent
0bc32fe676
commit
5ce969388d
1 changed files with 14 additions and 10 deletions
|
@ -60,40 +60,44 @@ void TestCase1() {
|
||||||
SomeStruct* ptrvar;
|
SomeStruct* ptrvar;
|
||||||
SomeStruct** ptrptrvar;
|
SomeStruct** ptrptrvar;
|
||||||
|
|
||||||
|
// constexpr
|
||||||
constexpr auto constexpr_work_fine = NAMEOF(intvar);
|
constexpr auto constexpr_work_fine = NAMEOF(intvar);
|
||||||
std::cout << constexpr_work_fine << std::endl; // intvar
|
std::cout << constexpr_work_fine << std::endl; // intvar
|
||||||
|
// enum
|
||||||
std::cout << NAMEOF(Color::RED) << std::endl; // RED
|
std::cout << NAMEOF(Color::RED) << std::endl; // RED
|
||||||
|
// variable
|
||||||
std::cout << NAMEOF(somevar) << std::endl; // somevar
|
std::cout << NAMEOF(somevar) << std::endl; // somevar
|
||||||
std::cout << NAMEOF(::somevar) << std::endl; // somevar
|
std::cout << NAMEOF(::somevar) << std::endl; // somevar
|
||||||
std::cout << NAMEOF(&somevar) << std::endl; // somevar
|
std::cout << NAMEOF(&somevar) << std::endl; // somevar
|
||||||
|
// member
|
||||||
std::cout << NAMEOF(somevar.somefield) << std::endl; // somefield
|
std::cout << NAMEOF(somevar.somefield) << std::endl; // somefield
|
||||||
std::cout << NAMEOF((&somevar)->somefield) << std::endl; // somefield
|
std::cout << NAMEOF((&somevar)->somefield) << std::endl; // somefield
|
||||||
|
// member
|
||||||
std::cout << NAMEOF(othervar.ll.field) << std::endl; // field
|
std::cout << NAMEOF(othervar.ll.field) << std::endl; // field
|
||||||
|
// variable
|
||||||
std::cout << NAMEOF(ptrvar) << std::endl; // ptrvar
|
std::cout << NAMEOF(ptrvar) << std::endl; // ptrvar
|
||||||
std::cout << NAMEOF(*ptrvar) << std::endl; // ptrvar
|
std::cout << NAMEOF(*ptrvar) << std::endl; // ptrvar
|
||||||
|
// variable
|
||||||
std::cout << NAMEOF(ptrptrvar) << std::endl; // ptrptrvar
|
std::cout << NAMEOF(ptrptrvar) << std::endl; // ptrptrvar
|
||||||
std::cout << NAMEOF(*ptrptrvar) << std::endl; // ptrptrvar
|
std::cout << NAMEOF(*ptrptrvar) << std::endl; // ptrptrvar
|
||||||
std::cout << NAMEOF(**ptrptrvar) << std::endl; // ptrptrvar
|
std::cout << NAMEOF(**ptrptrvar) << std::endl; // ptrptrvar
|
||||||
|
// variable
|
||||||
std::cout << NAMEOF(+intvar) << std::endl; // intvar
|
std::cout << NAMEOF(+intvar) << std::endl; // intvar
|
||||||
std::cout << NAMEOF(-intvar) << std::endl; // intvar
|
std::cout << NAMEOF(-intvar) << std::endl; // intvar
|
||||||
std::cout << NAMEOF(~intvar) << std::endl; // intvar
|
std::cout << NAMEOF(~intvar) << std::endl; // intvar
|
||||||
std::cout << NAMEOF(!intvar) << std::endl; // intvar
|
std::cout << NAMEOF(!intvar) << std::endl; // intvar
|
||||||
|
// function
|
||||||
std::cout << NAMEOF(&SomeStruct::SomeMethod2) << std::endl; // SomeMethod2
|
std::cout << NAMEOF(&SomeStruct::SomeMethod2) << std::endl; // SomeMethod2
|
||||||
std::cout << NAMEOF(SomeMethod3) << std::endl; // SomeMethod3
|
std::cout << NAMEOF(SomeMethod3) << std::endl; // SomeMethod3
|
||||||
|
// type
|
||||||
std::cout << NAMEOF(int[]) << std::endl; // int[]
|
std::cout << NAMEOF(int[]) << std::endl; // int[]
|
||||||
std::cout << NAMEOF(SomeStruct) << std::endl; // SomeStruct
|
std::cout << NAMEOF(SomeStruct) << std::endl; // SomeStruct
|
||||||
std::cout << NAMEOF(Long::LL) << std::endl; // LL
|
std::cout << NAMEOF(Long::LL) << std::endl; // LL
|
||||||
std::cout << NAMEOF(volatile const int) << std::endl; // volatile const int
|
std::cout << NAMEOF(volatile const int) << std::endl; // volatile const int
|
||||||
|
// macros
|
||||||
|
std::cout << NAMEOF(__LINE__) << std::endl; // __LINE__
|
||||||
|
std::cout << NAMEOF(__FILE__) << std::endl; // __FILE__
|
||||||
|
// full name
|
||||||
std::cout << NAMEOF_FULL(somevar.somefield) << std::endl; // somevar.somefield
|
std::cout << NAMEOF_FULL(somevar.somefield) << std::endl; // somevar.somefield
|
||||||
std::cout << NAMEOF_FULL(&SomeStruct::SomeMethod2) << std::endl; // &SomeStruct::SomeMethod2
|
std::cout << NAMEOF_FULL(&SomeStruct::SomeMethod2) << std::endl; // &SomeStruct::SomeMethod2
|
||||||
std::cout << NAMEOF_FULL(Long::LL) << std::endl; // Long::LL
|
std::cout << NAMEOF_FULL(Long::LL) << std::endl; // Long::LL
|
||||||
|
|
Loading…
Reference in a new issue