mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Foam::name() of memory address
- returns the memory address formatted in hexadecimal, which can be useful for detailed information
This commit is contained in:
committed by
Andrew Heather
parent
3870b1d43c
commit
3c07a1bb6f
@ -172,7 +172,7 @@ int main(int argc, char *argv[])
|
||||
if (iter.good())
|
||||
{
|
||||
Info<< "have " << k << nl
|
||||
<< " addr: " << uintptr_t(*iter) << nl
|
||||
<< " addr: " << name(*iter) << nl
|
||||
<< " info: " << (*iter)->info() << nl
|
||||
<< " info: " << iter->info() << nl
|
||||
<< " incr: " << iter->increment() << nl
|
||||
@ -214,7 +214,7 @@ int main(int argc, char *argv[])
|
||||
if (iter1.good())
|
||||
{
|
||||
Info<< "have " << k << nl
|
||||
<< " addr: " << uintptr_t(*iter1) << nl
|
||||
<< " addr: " << name(*iter1) << nl
|
||||
<< " info: " << (*iter1)->info() << nl
|
||||
<< " info: " << iter1->info() << nl
|
||||
<< " incr: " << iter1->increment() << nl
|
||||
@ -225,7 +225,7 @@ int main(int argc, char *argv[])
|
||||
if (iter2.good())
|
||||
{
|
||||
Info<< "have " << k << nl
|
||||
<< " addr: " << uintptr_t(*iter2) << nl
|
||||
<< " addr: " << name(*iter2) << nl
|
||||
<< " info: " << (*iter2)->info() << nl
|
||||
<< " info: " << iter2->info() << nl
|
||||
// Good: does not compile
|
||||
@ -237,7 +237,7 @@ int main(int argc, char *argv[])
|
||||
if (iter3.good())
|
||||
{
|
||||
Info<< "have " << k << nl
|
||||
<< " addr: " << uintptr_t(*iter3) << nl
|
||||
<< " addr: " << name(*iter3) << nl
|
||||
<< " info: " << (*iter3)->info() << nl
|
||||
<< " info: " << iter3->info() << nl
|
||||
// Good: does not compile
|
||||
|
||||
Reference in New Issue
Block a user