|
Boost Users : |
Subject: Re: [Boost-users] boost::priority_queue help
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-12-09 04:26:11
AMDG
On 12/08/2017 04:38 AM, Ram via Boost-users wrote:
> <snip>
>
> c:\Projects\pq_test.cpp(27): error C2662: 'void
> boost::heap::priority_queue<myObject*,boost::heap::compare<myObjectPtrCompare>>::push(myObject
> *const &)' : cannot convert 'this' pointer from 'const
> boost::heap::priority_queue<myObject
> *,boost::heap::compare<myObjectPtrCompare>>'
> to 'boost::heap::priority_queue<myObject
> *,boost::heap::compare<myObjectPtrCompare>>
> &'1> Conversion loses qualifiers
>
> Using Visual Studio 2013 C++. I understand that I am doing something wrong
> with const correctness, but I am not able to figure out what is wrong. Any
> help is appreciated.
>
You're trying to push onto a const priority_queue.
In Christ,
Steven Watanabe
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