deque.cc and rw/_tree.cc std::rel_ops unfriendly
------------------------------------------------
Key: STDCXX-120
URL: http://issues.apache.org/jira/browse/STDCXX-120
Project: STDCXX
Type: Bug
Components: 23. Containers
Versions: 4.1.3
Environment: HP aCC 6.x, optimized
Reporter: Martin Sebor
Assigned to: Martin Sebor
Fix For: 4.1.4
Compiling the following program with HP aCC 6.x with debugging iterators
disabled gives the errors below:
$ cat t.cpp && nice gmake t CPPOPTS=-D_RWSTD_NO_DEBUG_ITER
#include <deque>
#include <map>
#include <utility>
using namespace std;
using namespace std::rel_ops;
template class std::deque<int>;
template class std::map<int, int>;
int main () { }
aCC -c -D_RWSTDDEBUG -mt -D_RWSTD_USE_CONFIG
-I/build/sebor/aCC-6.0-15S/include -I/build/sebor/dev/stdlib/include
-I/build/sebor/dev/stdlib/../rwtest -I/build/sebor/dev/stdlib/../rwtest/include
-I/build/sebor/dev/stdlib/tests/include -D_RWSTD_NO_DEBUG_ITER -AA -g +d
+DD64 +w +W392 +W655 +W684 +W818 +W819 +W849 +W2193 +W2236 +W2261 +W2340 +W2401
+W2487 t.cpp
"/build/sebor/dev/stdlib/include/deque.cc", line 111: error #2350: more than
one operator "!=" matches these operands:
function template "std::operator!=(const
std::__rw_deque_iter<_TypeT, _DiffT, _Ptr1, _Ref1, _Alloc> &, const
std::__rw_deque_iter<_TypeT, _DiffT, _Ptr2, _Ref2, _Alloc> &)"
function template "std::rel_ops::operator!=(const _TypeT &, const
_TypeT &)"
operand types are: std::deque<int, std::allocator<int>>::iterator
!= std::deque<int, std::allocator<int>>::iterator
_RWSTD_ASSERT (__it != end ());
^
detected during instantiation of "std::deque<_TypeT,
_Allocator>::iterator std::deque<_TypeT, _Allocator>::erase(std::deque<_TypeT,
_Allocator>::iterator) [with _TypeT=int, _Allocator=std::allocator<int>]"
"/build/sebor/dev/stdlib/include/deque.cc", line 373: error #2350: more than
one operator "!=" matches these operands:
function template "std::operator!=(const
std::__rw_deque_iter<_TypeT, _DiffT, _Ptr1, _Ref1, _Alloc> &, const
std::__rw_deque_iter<_TypeT, _DiffT, _Ptr2, _Ref2, _Alloc> &)"
function template "std::rel_ops::operator!=(const _TypeT &, const
_TypeT &)"
operand types are: std::deque<int, std::allocator<int>>::iterator
!= const std::deque<int, std::allocator<int>>::iterator
for (iterator __ix = begin (); __ix != __end; ++__ix, --__n) {
^
detected during instantiation of "void std::deque<_TypeT,
_Allocator>::_C_assign_n(std::deque<_TypeT, _Allocator>::size_type,
std::deque<_TypeT, _Allocator>::const_reference) [with _TypeT=int,
_Allocator=std::allocator<int>]"
"/build/sebor/dev/stdlib/include/deque.cc", line 510: error #2350: more than
one operator "!=" matches these operands:
function template "std::operator!=(const
std::__rw_deque_iter<_TypeT, _DiffT, _Ptr1, _Ref1, _Alloc> &, const
std::__rw_deque_iter<_TypeT, _DiffT, _Ptr2, _Ref2, _Alloc> &)"
function template "std::rel_ops::operator!=(const _TypeT &, const
_TypeT &)"
operand types are: std::deque<int, std::allocator<int>>::iterator
!= const std::deque<int, std::allocator<int>>::iterator
for (iterator __ix = __self->begin (); __ix != __end; ++__ix, ++__first) {
^
detected during instantiation of "void std::deque<_TypeT,
_Allocator>::_C_assign_range(_InputIter, _InputIter, std::input_iterator_tag)
[with _TypeT=int, _Allocator=std::allocator<int>,
_InputIter=std::__rw_deque_iter<std::deque<int,
std::allocator<int>>::value_type, std::deque<int,
std::allocator<int>>::difference_type, std::deque<int,
std::allocator<int>>::const_pointer, std::deque<int,
std::allocator<int>>::const_reference, std::deque<int,
std::allocator<int>>::allocator_type>]"
"/build/sebor/dev/stdlib/include/rw/_tree.cc", line 815: error #2350: more than
one operator "!=" matches these operands:
function template "__rw::operator!=(const
__rw::__rw_tree_iter<_TypeT, _DiffT, _Ptr1, _Ref1, _Node> &, const
__rw::__rw_tree_iter<_TypeT, _DiffT, _Ptr2, _Ref2, _Node> &)"
function template "std::rel_ops::operator!=(const _TypeT &, const
_TypeT &)"
operand types are: __rw::__rb_tree<std::map<int, int,
std::less<int>, std::allocator<std::pair<const int, int>>>::key_type,
std::map<int, int, std::less<int>, std::allocator<std::pair<const int,
int>>>::value_type, __rw::__select1st<std::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int>>>::value_type, std::map<int, int,
std::less<int>, std::allocator<std::pair<const int, int>>>::key_type>,
std::map<int, int, std::less<int>, std::allocator<std::pair<const int,
int>>>::key_compare, std::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int>>>::allocator_type>::iterator !=
__rw::__rb_tree<std::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int>>>::key_type, std::map<int, int,
std::less<int>, std::allocator<std::pair<const int, int>>>::value_type,
__rw::__select1st<std::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int>>>::value_type, std::map<int, int,
std::less<int>, std::allocator<std::pair<const int, int>>>::key_type>,
std::map<int, int, std::less<int>, std::allocator<std::pair<const int,
int>>>::key_compare, std::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int>>>::allocator_type>::iterator
for (__tmp = end (); __first != __last; __tmp = erase (__first++));
^
detected during instantiation of "__rw::__rb_tree<_Key, _Val, _KeyOf,
_Comp, _Alloc>::iterator __rw::__rb_tree<_Key, _Val, _KeyOf, _Comp,
_Alloc>::erase(__rw::__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator,
__rw::__rb_tree<_Key, _Val, _KeyOf, _Comp, _Alloc>::iterator) [with
_Key=std::map<int, int, std::less<int>, std::allocator<std::pair<const int,
int>>>::key_type, _Val=std::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int>>>::value_type,
_KeyOf=__rw::__select1st<std::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int>>>::value_type, std::map<int, int,
std::less<int>, std::allocator<std::pair<const int, int>>>::key_type>,
_Comp=std::map<int, int, std::less<int>, std::allocator<std::pair<const int,
int>>>::key_compare, _Alloc=std::map<int, int, std::less<int>,
std::allocator<std::pair<const int, int>>>::allocator_type]"
4 errors detected in the compilation of "t.cpp".
gmake: *** [t.o] Error 2
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira