Boost logo

Boost Users :

Subject: [Boost-users] Crash in VS2013, bug in compiler, boost or my code ? (flyweight, variant and initializer list)
From: Olivier Tristan (o.tristan_at_[hidden])
Date: 2013-12-13 12:16:09


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 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