If could get initializers list and variadic templates just by killing VC10, I would have done so long time ago. Unfortunately, from the features you listed, VC11 support only strongly typed enums and range-based for. The other ones were released in so called “November '12 CTP of the C++ compiler” that is alpha-quality and practically useless.
I had hoped that these C++11 features would be released as part of recent Update 2 but that did not happen. I guess we’ll have to wait at least till the Build 2013 conference (26–28 Jun) for further updates. That would be consistent with their promise that “next batch of C++11 features would be coming in the first half of 2013” ( blogs.msdn.com/b/vcblog/archive/ … x#10369778 ).
XP support is not an issue. AFAIK there are no developers using Windows XP and Visual Studio. If there were, they can always switch to MinGW. AVS uses that configuration if I remember correctly.
Catching stacktrace is not always reliable in optimized builds. Even when it works, in order to get the names of symbols and source file references you need the debug symbols. They are big and not distributed with VCMI binaries.
The macro seems much more feasible to me. It can create a custom exception class object as well and reliably give its constructor the information, where the throwing is taking place. (stacktrace are impossible though )
Why do we don’t want to print line number, etc… of throwing place when logging system fails to initialize? Such failure seems to me like an abnormal situation that we care what caused it.
I’d say that every situation when we throw an exception should be by default treated as error and we should log as much information about it as possible. It is better to log the source code line for a non-critical error, than not to do it for a truly critical one.
I am aware that there are places when exceptions are used to steer the codeflow (not to signal an unexpected problem) and there logging the location may be pointless. If an exception throw is an expected execution path, then such cases can be handled individually. I am not saying to forcibly use the hypothetic throwing macro for all throws in the code.
Sorry, I don’t quite understand this point. Why should they decide? Logger is just logging.
Writing location should be decided either at the throwing place or by the catch block.
Well, a custom “throw” macro seems like a way to have more accurate logs without imposing a cost on writing/maintaining the code. I wanted to do that for a quite while, just there was no opportunity.
I’m also going to rethink the automatic indent level. It would make logs more readable, especially with that function entry/leave style. It could work as a global, thread-local state. Still I need to experiment with the idea a little, I’ll write how I see that later.