jeremywestAMX / ember-plus

Automatically exported from code.google.com/p/ember-plus
0 stars 0 forks source link

AsyncBerReader::reset() causes compilation error #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
According 23.2.3.3 (Class template stack) of the C++03 standard, std::stack<..> 
doesn't provide a swap(..) member function. Therefore the line 
m_stack.swap(std::stack<std::auto_ptr<AsyncContainer> >()); causes a 
compilation error with GCC (tested with 4.6.3 and 4.8.1). Further more, the 
same line issues the warning C4239 (nonstandard extension used : 'argument' : 
conversion from 'std::stack<_Ty>' to 'std::stack<_Ty> &') with Visual Studio 
(2012). I attached a patch, which maybe used.

Used code:
http://ember-plus.googlecode.com/svn/tags/emberplussdk-1-4-0 @ rev. 38 (Ember+ 
SDK v1.4).

Original issue reported on code.google.com by nullable...@gmail.com on 22 Jul 2013 at 8:48

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by Kimon.Ho...@lawo.com on 23 Jul 2013 at 8:02

GoogleCodeExporter commented 9 years ago
What is even worse is that the stacks value type is an auto_ptr<> 
specialization.
Because of their "copy transfers ownership" semantics auto_ptrs are not meant 
to be stored in standard containers.

I'll fix this whole issue more thoroughly.

Original comment by Kimon.Ho...@lawo.com on 23 Jul 2013 at 8:15

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r40.

Original comment by Kimon.Ho...@lawo.com on 25 Jul 2013 at 10:14