Boost logo

Boost Users :

Subject: [Boost-users] multi_index member key extractors crash MSVC 2015
From: Filip Konvička (filip.konvicka_at_[hidden])
Date: 2015-08-19 04:28:03


it looks like using boost::multi_index::member<> crashes MSVC 2015 RTM
when a const-qualified type is passed to it as the 2nd argument, but the
member is actually non-const.

#include <boost\multi_index_container.hpp>
#include <boost\multi_index\member.hpp>
#include <boost\multi_index\indexed_by.hpp>
#include <boost\multi_index\ordered_index.hpp>

struct X {
   int number; // non-const
using namespace boost::multi_index;
int main() {
   typedef multi_index_container<X, indexed_by<ordered_unique<member<X,
const int, &X::number> > > > C;
   C c;
   c.find(1); // C1001
   return 0;

...\include\boost\multi_index\member.hpp(65): fatal error C1001: An
internal error has occurred in the compiler.
   (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c', line 246)

I found the following on a related subject, but I'm not sure whether
this is a separate issue or not.!topic/boost-devel-archive/gi-xGnCkvPI


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at