trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: April 2012

Re: [trinity-devel] tdebase build failure - easyvector.h:90:5: error: 'erase' was not declared in this scope

From: "David C. Rankin" <drankinatty@...>
Date: Wed, 04 Apr 2012 23:52:03 -0500
On 04/04/2012 11:37 PM, /dev/ammo42 wrote:
> On Wed, 04 Apr 2012 22:39:05 -0500
> "David C. Rankin" <drankinatty@...> wrote:
> 
>> On 04/04/2012 10:20 PM, David C. Rankin wrote:
>>> /build/src/tdebase/kicker/applets/launcher/easyvector.h:90:5:
>>> error: 'erase' was not declared in this scope, and no declarations
>>> were found by argument-dependent lookup at the point of
>>> instantiation [-fpermissive]
>>
>> Damn,
>>
>>   I got tdebase to build, but this is the first time I had to use
>> -fpermissive on the new code. Any idea why that suddenly became
>> required?
> Quick fix: add this-> to calls to inherited std::vector::erase()
> function.
> Long fix: get rid of/rewrite this broken* code which doesn't seem to add
> much compared to a C++98 compliant std::vector (std::vector::at()
> does bound-checking already, for example).
> 
> * wrapping a STL container by public inheritance, seriously ?

dev/ammo


You are way way ahead of me (that's normal) so thanks. Now when you say:

Quick fix: add this-> to calls to inherited std::vector::erase()

are you saying to pick to the code and find the std::vector::erase() calls and
make them this->std::vector::erase() ?

I'll give it a go and report back -- will be tomorrow.

-- 
David C. Rankin, J.D.,P.E.