Thanks, but this lead to another question to me: I learnt from some online tutorial that when we use "class" we usually create an object of the class. If we want to initialize it with default constructor we just declare it as: Classname objectname - no parentheses after the objectname. Is here the case that we use class without creating an instance (I mean Classname{})?
I found another example, you defined a class "Heisenberg" in the file heisenberg.h and use the class directly in the example file idmrg.cc as:
IQMPO H = Heisenberg(sites, {"Infinite=",true});
Is the above code the same as:
Heisenberg instancename(sites, {"Infinite=",true});
IQMPO H = instancename.IQMPO();
Why can we use it in the simpler way you wrote?
And by the way, is the word "operator" in "operator IQMPO() { init_(); return H; }" a name of the class that you defined? Or is it defined by C++?
Thank you very much.