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 17:54:08


Care to define "crash"?

If the compiler "crashes" (i.e. access violates; internal compiler error et. al.), then it is always a compiler bug; A compiler shouldn't choke on the input.

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


-----Original Message-----
From: Boost-users [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Olivier Tristan
Sent: Friday, December 13, 2013 6:16 PM
To: boost-users_at_[hidden]
Subject: [Boost-users] Crash in VS2013, bug in compiler, boost or my code ? (flyweight, variant and initializer list)

Hello Boost users,

Using the following sample code I have some crash in VS2013 but it works fine in LLVM on OSX Is this is a mistake on my side or an issue elsewhere ?

#include <string>
#include <cstdint>
#include <vector>
#include <boost/flyweight/flyweight.hpp> #include <boost/flyweight/no_tracking.hpp> #include <boost/flyweight/static_holder.hpp>
#include <boost/flyweight/set_factory.hpp> #include <boost/flyweight/simple_locking.hpp>
#include <boost/variant.hpp>

typedef boost::flyweights::flyweight<
   std::string,
   boost::flyweights::no_tracking,
   boost::flyweights::set_factory<>,
   boost::flyweights::static_holder,
   boost::flyweights::simple_locking
> string_flyweight;


typedef boost::variant<
   bool,
   double,
   string_flyweight
> Variant;


int main(void)
{
   std::vector<Variant> v = { 1., true, string_flyweight("toto") };
   return 0;
}

Thanks,


--
Olivier TRISTAN
uvi.net
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


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