Sponsored Content
Top Forums Programming std::reverse_iterator in Sun C++ Post 302344139 by shingpui on Friday 14th of August 2009 04:46:46 PM
Old 08-14-2009
std::reverse_iterator in Sun C++

Hi,

I'm having trouble compling the following code in Sun C++ (under sun studio 10). I found that it is issue with libCstd library. It can be resolved if i used stdport lib. However, i have no choice but to use libCstd. Does anyone know what can be done to resolve the issue? Smilie

Thanks,

/////////////////////////////////////////
Here is the code:
/////////////////////////////////////////

template< class _Ty >
class VectorMe
{
typedef _Ty* _pTy;
typedef std::vector< _pTy > Vector;
typedeftypename Vector::iterator iterator;

typedef std::reverse_iterator<iterator> reverse_iterator; //problem with this line when complied under Solaris

...
//main body
...

/////////////////////////////////////////
Here is the error message:
/////////////////////////////////////////

Too few arguments for template std::reverse_iterator<std::vector<_Ty*>::iterator>

Last edited by shingpui; 08-14-2009 at 05:59 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to redirect std out and std err to same file

Hi I want both standard output and standard error of my command cmd to go to the same file log.txt. please let me know the best commandline to do this. Thanks (2 Replies)
Discussion started by: 0ktalmagik
2 Replies

2. Programming

Sun Studio C++ - Getting error in linking std::ostream &std::ostream::operator<<(std:

Hello all Im using CC: Sun C++ 5.6 2004/07/15 and using the -library=stlport4 when linkning im getting The fallowing error : Undefined first referenced symbol in file std::ostream &std::ostream::operator<<(std::ios_base&(*)(std::ios_base&))... (0 Replies)
Discussion started by: umen
0 Replies

3. Shell Programming and Scripting

reading from within the loop --std i/p problem

i have a teat file having data like one 12/3 two 23/09 three 12/12 now from another script i want to read one line at a time ,cut field one and two in two separate variable ,compare field1 with another variable but outside the loop .If i found a match i want to take from user the value... (2 Replies)
Discussion started by: mobydick
2 Replies

4. Shell Programming and Scripting

redirecting std error

Hi, I use the following command make all > output-`date +%F-%H-%M-%S`.txt 2>&1 to invoke a MAKE process that takes some weeks to complete. The ouput is redirected to a text file. Now I prefix the above command with time to get time needed for completion of the MAKE process time make... (2 Replies)
Discussion started by: gkamendje
2 Replies

5. AIX

Redirecting Both to a file and std output

Hello Friends, Can some one help me how to redirect output of a file to both a file and std output? All the help would be greatly appreciated. Regards Sridhar (1 Reply)
Discussion started by: send2sridhar
1 Replies

6. Shell Programming and Scripting

read from std i/p with timeout within a script

hello every one , this is my first participation in the forum , I hope it'll be a good start within a script I would like to put some code to read i\p from standard i\p using read command if it reads Y it will terminate the script if it reads N it will continue execution , if no i\p is... (2 Replies)
Discussion started by: Blue_shadow
2 Replies

7. Shell Programming and Scripting

Help with Getopt::Std

I am working on a script that lists files in a directory with a few file attributes depending on what option the user specifies at the command prompt. The script uses Getopt::Std and takes two switches. The first switch allows the user to specify a directory, the second switch gives a long... (3 Replies)
Discussion started by: Breakology
3 Replies

8. Solaris

Camouflage STD IN on output (TRU64)

Hi guys, i have a new problem, even in scripting on KSH. Given a string by standard INPUT (keyboard), i need to replace each character i print with this one '#' . It's to camouflage password while digiting on command line. For example: ---------------------------------- prompt$ ... (3 Replies)
Discussion started by: D4vid
3 Replies

9. Shell Programming and Scripting

Ksh script: std Out/err

Hello gurus, this is part of my script: ls -1 ${MyFile} >> ${dir_log}ListFile${Now}.tmp FILENUM=`cat ${dir_log}ListFile${Now}.tmp| wc -l | awk '{print $1}'`>> /dev/null if then writeError "ERRORE: no file in directory for type ${FileName}!" >> ${LogFileName} Close 1 fi... (7 Replies)
Discussion started by: GERMANICO
7 Replies

10. Shell Programming and Scripting

Capture std out snapshot after 15 seconds

I have a program that scans and updates its results to std out every second. I would like to capture its output for further processing, but there is a catch. I would like to capture a snapshot after about 15 seconds as the results become more accurate and close the program. Obviously I can simply... (4 Replies)
Discussion started by: Riker1204
4 Replies
std::reverse_iterator< _Iterator >(3cxx)								  std::reverse_iterator< _Iterator >(3cxx)

NAME
std::reverse_iterator< _Iterator > - SYNOPSIS
Inherits std::iterator< iterator_traits< _Iterator >::iterator_category, iterator_traits< _Iterator >::value_type, iterator_traits< _Iterator >::difference_type, iterator_traits< _Iterator >::pointer, iterator_traits< _Iterator >::reference >. Public Types typedef __traits_type::difference_type difference_type" typedef iterator_traits < _Iterator > ::iterator_category iterator_category" typedef _Iterator iterator_type typedef __traits_type::pointer pointer typedef __traits_type::reference reference typedef iterator_traits < _Iterator >::value_type value_type" Public Member Functions reverse_iterator () reverse_iterator (iterator_type __x) reverse_iterator (const reverse_iterator &__x) template<typename _Iter > reverse_iterator (const reverse_iterator< _Iter > &__x) iterator_type base () const reference operator* () const reverse_iterator operator+ (difference_type __n) const reverse_iterator & operator++ () reverse_iterator operator++ (int) reverse_iterator & operator+= (difference_type __n) reverse_iterator operator- (difference_type __n) const reverse_iterator & operator-- () reverse_iterator operator-- (int) reverse_iterator & operator-= (difference_type __n) pointer operator-> () const reference operator[] (difference_type __n) const Protected Types typedef iterator_traits < _Iterator > __traits_type" Protected Attributes _Iterator current Detailed Description template<typename _Iterator>class std::reverse_iterator< _Iterator > Bidirectional and random access iterators have corresponding reverse iterator adaptors that iterate through the data structure in the opposite direction. They have the same signatures as the corresponding iterators. The fundamental relation between a reverse iterator and its corresponding iterator i is established by the identity: &*(reverse_iterator(i)) == &*(i - 1) This mapping is dictated by the fact that while there is always a pointer past the end of an array, there might not be a valid pointer before the beginning of an array. [24.4.1]/1,2 Reverse iterators can be tricky and surprising at first. Their semantics make sense, however, and the trickiness is a side effect of the requirement that the iterators must be safe. Definition at line 97 of file stl_iterator.h. Member Typedef Documentation typedef iterator_traits< _Iterator >::iterator_category std::iterator< iterator_traits< _Iterator >::iterator_category , iterator_traits< _Iterator >::value_type , iterator_traits< _Iterator >::difference_type , iterator_traits< _Iterator >::pointer , iterator_traits< _Iterator >::reference >::iterator_category [inherited] One of the tag types. Definition at line 122 of file stl_iterator_base_types.h. typedef iterator_traits< _Iterator >::value_type std::iterator< iterator_traits< _Iterator >::iterator_category , iterator_traits< _Iterator >::value_type , iterator_traits< _Iterator >::difference_type , iterator_traits< _Iterator >::pointer , iterator_traits< _Iterator >::reference >::value_type [inherited] The type 'pointed to' by the iterator. Definition at line 124 of file stl_iterator_base_types.h. Constructor &; Destructor Documentation template<typename _Iterator> std::reverse_iterator< _Iterator >::reverse_iterator () [inline] The default constructor default-initializes member current. If it is a pointer, that means it is zero-initialized. Definition at line 121 of file stl_iterator.h. Referenced by std::reverse_iterator< _Iterator >::operator+(), and std::reverse_iterator< _Iterator >::operator-(). template<typename _Iterator> std::reverse_iterator< _Iterator >::reverse_iterator (iterator_type__x) [inline], [explicit] This iterator will move in the opposite direction that x does. Definition at line 127 of file stl_iterator.h. template<typename _Iterator> std::reverse_iterator< _Iterator >::reverse_iterator (const reverse_iterator< _Iterator > &__x) [inline] The copy constructor is normal. Definition at line 132 of file stl_iterator.h. template<typename _Iterator> template<typename _Iter > std::reverse_iterator< _Iterator >::reverse_iterator (const reverse_iterator< _Iter > &__x) [inline] A reverse_iterator across other types can be copied in the normal fashion. Definition at line 140 of file stl_iterator.h. Member Function Documentation template<typename _Iterator> iterator_type std::reverse_iterator< _Iterator >::base () const [inline] Returns: current, the iterator used for underlying work. Definition at line 147 of file stl_iterator.h. Referenced by std::operator==(). template<typename _Iterator> reference std::reverse_iterator< _Iterator >::operator* () const [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 156 of file stl_iterator.h. Referenced by std::reverse_iterator< _Iterator >::operator->(). template<typename _Iterator> reverse_iterator std::reverse_iterator< _Iterator >::operator+ (difference_type__n) const [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 227 of file stl_iterator.h. References std::reverse_iterator< _Iterator >::reverse_iterator(). template<typename _Iterator> reverse_iterator& std::reverse_iterator< _Iterator >::operator++ () [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 177 of file stl_iterator.h. template<typename _Iterator> reverse_iterator std::reverse_iterator< _Iterator >::operator++ (int) [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 189 of file stl_iterator.h. template<typename _Iterator> reverse_iterator& std::reverse_iterator< _Iterator >::operator+= (difference_type__n) [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 236 of file stl_iterator.h. template<typename _Iterator> reverse_iterator std::reverse_iterator< _Iterator >::operator- (difference_type__n) const [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 248 of file stl_iterator.h. References std::reverse_iterator< _Iterator >::reverse_iterator(). template<typename _Iterator> reverse_iterator& std::reverse_iterator< _Iterator >::operator-- () [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 202 of file stl_iterator.h. template<typename _Iterator> reverse_iterator std::reverse_iterator< _Iterator >::operator-- (int) [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 214 of file stl_iterator.h. template<typename _Iterator> reverse_iterator& std::reverse_iterator< _Iterator >::operator-= (difference_type__n) [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 257 of file stl_iterator.h. template<typename _Iterator> pointer std::reverse_iterator< _Iterator >::operator-> () const [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 168 of file stl_iterator.h. References std::reverse_iterator< _Iterator >::operator*(). template<typename _Iterator> reference std::reverse_iterator< _Iterator >::operator[] (difference_type__n) const [inline] Returns: TODO Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 269 of file stl_iterator.h. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Nov 27 2012 std::reverse_iterator< _Iterator >(3cxx)
All times are GMT -4. The time now is 02:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy