Unless you need the stacktrace to be logged to a text file, I suggest you look at this system-provided facility: https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx
msdn.microsoft.com
Starting with Windows Server 2008 and Windows Vista with Service Pack 1 (SP1), Windows Error Reporting (WER) can be configured so that full user-mode dumps are ...
|
The kernel will generate a dump that you can open in Visual Studio, windbg (free) and probably in other tools too. It's basically the equivalent of unix core-dumps. You can also configure the level of detail in the dump, so the resulting file can be small in case you want to collect them from end-users. Do note that the dump files are usable only with the exact build which generated them, i.e., archive all builds (and their PDBs) that you've ever distributed to somebody.
IOW, you can get out more information than with boost.stacktrace with zero coding.