Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » stl-compatibility
stl-compatibility [message #39649] Fri, 12 April 2013 21:26 Go to previous message
piotr5 is currently offline  piotr5
Messages: 107
Registered: November 2005
Experienced Member
I noticed you have some nice macros for enabling stl-compatibility in upp containers. unfortunately it doesn't always work the way it should. obviously size() you have not added the cv-qualifier const. are there any containers that return GetCount() that could alter the object, or containers that abuse the call for cleaning up?

another more serious problem I noticed when trying the std::includes() template algorithm:

In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_algobase.h:66:0,
                 from /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/algorithm:62,
                 from /home/p/upp/uppsrc/Core/Core.h:212,
                 from /home/p/MyApps/s6/s6.cpp:1:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_iterator_base_types.h: At global scope:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_iterator_base_types.h: In instantiation of ‘std::iterator_traits<Upp::Array<Upp::String
	>::ConstIterator>’:
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_algo.h:3519:2:   instantiated from ‘bool std::includes(_IIter1, _IIter1, _IIter2, _IIte
	r2) [with _IIter1 = Upp::Array<Upp::String>::ConstIterator, _IIter2 = Upp::Array<Upp::String>::ConstIterator]’
/home/p/MyApps/s6/s6.cpp:10:58:   instantiated from ‘bool Upp::IsSubset(const INDEX&, const INDEX&) [with INDEX = Upp::ArrayIndex<Upp::String>]’
/home/p/MyApps/s6/s6.cpp:95:98:   instantiated from here
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_iterator_base_types.h:166:53: error: no type named ‘iterator_category’ in ‘class Upp::A
	rray<Upp::String>::ConstIterator’
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_iterator_base_types.h:167:53: error: no type named ‘value_type’ in ‘class Upp::Array<Up
	p::String>::ConstIterator’
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_iterator_base_types.h:168:53: error: no type named ‘difference_type’ in ‘class Upp::Arr
	ay<Upp::String>::ConstIterator’
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_iterator_base_types.h:169:53: error: no type named ‘pointer’ in ‘class Upp::Array<Upp::
	String>::ConstIterator’
/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/include/g++-v4/bits/stl_iterator_base_types.h:170:53: error: no type named ‘reference’ in ‘class Upp::Array<Upp
	::String>::ConstIterator’

is there any list of what algorithms are supported and what aren't? or will this get better with next gcc version?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: small dli enhancement
Next Topic: Is it possible to use Core/Rpc in non blocking mode?
Goto Forum:
  


Current Time: Fri May 03 21:34:23 CEST 2024

Total time taken to generate the page: 0.03354 seconds