I wanted to add to always, always, be very very careful with values "that can only hold two states". Unless your variable actually holds a representation of "true/false", more often that not, it ends...
In this case "MyConst" will probably get inlined anyways, but imagining that MyConst was complex, then the usual method is to create a "non template X" where x is one of:
a)Base class
b)Standalone...
No:
"in the 2nd case the value of the char dlm will be set only when the if statement holds true".
"otherwise it should be undefined": "undefined" is not a special spectral value that crashes a...
I wish, but this current project has the following restraints:
1) No templates due to compiler limitations.
2) No non in-house code.
EDIT: 3) No exceptions.
:(
Rule of thumb:
*If it starts with an underscore, then it is not standard.
*If it starts with 2 underscores, then it is not standard, and compiler specific.
To give you a quick answer: Yes, but it is complicated. You want to search for either "traits" (general solution), or, in your particular case: SFINAE.
Interchanging iterators creates undefined behavior, simple as that. What's to keep you from checking during debug that the iterators came from the same object? All you need is to keep a pointer to...
There are many different files that are involved in the construction of a final product, your "main.exe", or whatever your project is called. That's the only file AVG is having problems with, and the...
It happens sometimes when you write very simple programs. It is just a false positive from your anti virus program: Usually, just touching anything in your source and recompiling is enough.