When calling erase() on a containers derived from __base_associative
(e.g. multimap) and providing a pair of iterators a segfault will
occur.
Example code to reproduce:
typedef std::multimap<int, int> testmap;
testmap t;
t.insert(std::pair<int, int>(1, 1));
t.insert(std::pair<int, int>(2, 1));
t.insert(std::pair<int, int>(3, 1));
t.erase(t.begin(), t.end());
Signed-off-by: Ben Kelly <ben@benjii.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
uClibc uses WARNINGS too so use UCLIBCXX_WARNINGS here to avoid
redefinition warnings on setups using both libs.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
uClibc++ current does not build using an ARM EABI toolchain with the
following build failure:
eh_alloc.cpp
In file included from ../include/basic_definitions:21:0,
from ../include/cstdlib:20,
from eh_alloc.cpp:20:
../include/system_configuration.h:17:0: warning: "__WARNINGS__" redefined [enabled by default]
/opt/toolchains/armeabi-uclibc-std-0.9.30.2-gcc-4.6.0-binutils-2.20.1/arm-linux-uclibcgnueabi/sysroot/usr/include/bits/uClibc_config.h:223:0: note: this is the location of the previous definition
In file included from eh_alloc.cpp:25:0:
../include/unwind-cxx.h:176:36: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:177:36: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:178:35: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:179:41: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:180:40: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:181:39: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:182:38: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
../include/unwind-cxx.h:183:37: error: ISO C++ forbids casting to an array type '_Unwind_Exception_Class'
make[1]: *** [eh_alloc.o] Error 1
make[1]: Leaving directory `/home/florian/dev/uclibcxx/uClibc++/src'
Workaround this by direclty using the string "GNUCC++".
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Fix operator=(const valarray<T>&) DR 630
Adjust constness of operator[](size_t)
Properly implement class member valarray<bool> operator!()
Fix operator|= (const T&) to or, not not
Fix both shift() and cshift() for any overrun and +- offsets
Fix slice_array& operator=(const slice_array&) to return properly
Adjust class gslice default constructor DR 543
Fix valarray<bool> operator>(const T&, const valarray<T>&)
Return the result of all algo
Fix copy'n paster error in atan2() inner fn call
Fix pow (const T& const valarray<T>&)
Later versions add .swap, prepare for that.
Dump additional observations to TODO
Unnoted: satisfy gcc/libstdc++/testsuite/26_numerics/valarray/dr543.cc really
Unnoted: TR1/2 audit? Check against current boost? ;)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Added test cases to test ios:exception code (more always needed)
istream::get(char * buffer, streamsize n) now more standards compliant. Specifically, it fetches
n-1 characters instead of n characters, terminating with traits::eos().