Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

C++11 Pointer to Member Function

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 1.43 sec, absolute running time: 0.08 sec, cpu time: 0.02 sec, memory peak: 3 Mb, absolute service time: 1,52 sec 
edit mode |  history
Error(s):
 [INFO] Pointer not initilialized yet.
 [INFO] Pointer initilialized OK.
=== Experiment 1 ===============

--------------------------------------------------
Name     = I am a dummy class named <DUMMY>

Location = Unknown location

=== Experiment 2 - Using typedef ===============
--------------------------------------------------
d.getName() == I am a dummy class named <DUMMY>

=== Experiment 3 - Invoking member function with free function =
--------------------------------------------------
 [1] Method invocation returned value: I am a dummy class named <DUMMY>
 [1] Method invocation returned value: Unknown location
 [1] Method invocation returned value: I am a function-object called: <DUMMY>

=== Experiment 4 - Invoking member function with free function C++11
--------------------------------------------------
 [2] Method invocation returned value: I am a dummy class named <DUMMY>
 [2] Method invocation returned value: Unknown location
 [2] Method invocation returned value: I am a function-object called: <DUMMY>

=== Experiment 5 - Pointer to member functions in STL deque collection
 (+) Calll returned = I am a dummy class named <DUMMY>
 (+) Calll returned = Unknown location
 (+) Calll returned = I am a function-object called: <DUMMY>

=== Experiment 6 - Pointer to member functions in map collection
     invoke(object,          callme) = I am a function-object called: <DUMMY>
     invoke(object,     getLocation) = Unknown location
     invoke(object,         getName) = I am a dummy class named <DUMMY>

=== Experiment 7 - Template 
 [3] Method invocation returned value: I am a dummy class named <DUMMY>
 [3] Method invocation returned value: My name is DummyB
 [3] Method invocation returned value: Unknown location
 [3] Method invocation returned value: Location of dummyB location

=== Experiment 8 - Template 
--------------------------------------------------
d.getName()         = I am a dummy class named <DUMMY>
d.compute(3.0, 4.0) = 32

    
                
λ
.NET NoSQL database for rapid development