Archive for January, 2009

Stupid compiler error messages

Posted by mikedaum on January 27th, 2009

Just got this delightful error message:

gslwrap/HMCMC.cpp:57: error: conversion from ‘boost::cb_details::iterator<boost::circular_buffer<bool, std::allocator<bool> >, boost::cb_details::const_traits<std::allocator<bool> > >’ to non-scalar type ‘boost::cb_details::iterator<boost::circular_buffer<bool, std::allocator<bool> >, boost::cb_details::nonconst_traits<std::allocator<bool> > >’ requested

I get it and its ilk fairly regularly.  Takes me a bit to actually sort it out.  Don’t know why.  What it’s trying to say is that I used a non-const iterator somewhere where it needed to be a const_iterator.

Was that so hard?