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


Hi,

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.

http://www.boost.org/development/tests/master/developer/output/teeks99-08l-win2012R2-64on64-boost-bin-v2-libs-multi_index-test-test_key_extractors-test-msvc-14-0-dbg-adrs-mdl-64-thrd-mlt.html

https://connect.microsoft.com/VisualStudio/feedback/details/1577162/vc-internal-compiler-error-for-a-non-type-template-instantiation

https://groups.google.com/forum/#!topic/boost-devel-archive/gi-xGnCkvPI

Thanks,
Filip


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