Boost logo

Boost Users :

Subject: [Boost-users] boost::intrusive::slist push_back() => error: static assertion failed: (cache_last)
From: Jonas Printzén (jonas.printzen_at_[hidden])
Date: 2015-05-09 06:12:51


Hi All! First post...

Attempt switching to intrusive slist for efficiency, the following example
is
simply cut-paste from docs. Won't compile! g++ 4.9.1 complains as
inlined in code below.

#include <boost/intrusive/slist.hpp>
using namespace boost::intrusive;

struct point : slist_base_hook<> {
  int64_t x,y;
};

using points = slist<point>;

int main() {
  points plist;
  point p1,p2,p3;

  ACCEPT( 0U == plist.size() );

  plist.push_back( p1 ); // => error: static assertion failed:
(cache_last)

  ACCEPT( 1U == plist.size() );
}

The code is from the docs of my version (1.55) and im pretty sure
this or similar worked before. (1.54 i think)

Please help, what am I missing?



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