Boost logo

Boost Users :

Subject: Re: [Boost-users] Crash in VS2013, bug in compiler, boost or my code ? (flyweight, variant and initializer list)
From: Andreas M. Iwanowski (namezero_at_[hidden])
Date: 2013-12-13 20:03:20


>Probably related to this: it's appears to be a known (and pretty serious IMO) bug in the compiler.
>http://connect.microsoft.com/VisualStudio/feedback/details/800104/
>The report has to do with CString, but an SO blog explains how the compiler is treating temporaries.
>http://stackoverflow.com/questions/19269345/initializing-map-of-maps-with-initializer-list-in-vs-2013
>Plausible workaround: avoid initializer lists, especially of VS20XX is your target.
>Other than that, HTH and good luck.

+1 for digging this out.
This is a really nasty compiler bug indeed.
It would indeed make sense, since string_flyweight is the complex type where the compiler would trash the memory.
You could try with other types just to verify, but this indeed seems to be the compiler's fault and not yours.


Mit freundlichen Grüßen / With best regards

Andreas Iwanowski - IT Administrator / Software Developer
www.awato.de | namezero_at_[hidden]
T: +49 (0)2133 26031 55 | F: +49 (0)2133 26031 01
awato Software GmbH | Salm Reifferscheidt Allee 37 | D-41540 Dormagen

avisor-Support | T: +49 (0)621 6094 043 | F: +49 (0)621 6071 447

Geschäftsführer: Ursula Iwanowski | HRB: Neuss 7208 | VAT-no.: DE 122796158


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net