Is it possible to create a template meta construction that can take one execution path first time (or first n times) it is called and another execution path if it is called more than once (more then n times)?
Is it possible to create a template meta construction that can take one execution
Share
No. Templates are evaluated at compile time only.
The question is about things that happen at run-time (execution path).
Now it should be very possible to build this construct in code, but it is not a template meta-construct (though it can be part of a template meta-program, but the code that does the test will be runtime code (ie normal code)).