public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Ajay Bansal" <Ajay_Bansal@infosys.com>
To: <gcc-help@gcc.gnu.org>
Subject: no matching function for call to ``vector<C1, allocator<C1> >::at (int &) const'
Date: Thu, 23 Jan 2003 12:52:00 -0000	[thread overview]
Message-ID: <2B721C6525F0D411B1E900B0D0226BDDFD2313@mohmsg01.ad.infosys.com> (raw)

Hi All

I am getting the following error on compiling the code

/home/porting/ajay/project/Code/CObArray.h: In 
method `T1 &CObArray<T1, T2>::GetAt (int) const [with T1 = C1, T2 = C1
&]':
/home/porting/ajay/project/Code/DbUtilities.h:575:   instantiated from
`C2<T>::Find (CString &, T &) [with T = C1]' DbManager.cpp:217:
instantiated from here /home/porting/ajay/project/Code/CObArray.h:152:
no matching function for call to ``vector<C1, allocator<C1> >::at (int
&) const'


Relevent code from different files is 

***************CObArray.h************************************

template<class T1,class T2>
class CObArray
{
        public:
                        CObArray();
                virtual ~CObArray();
			.               
                T1 & GetAt(int) const
			{
        			if(index < arr.size())
                			return (T1&) arr.at(index);
			}
			.
			.
        protected:
                vector<T1>      arr;
        private:
                typename vector<T1>::iterator   iter;
}


*******************************************************

***********DbManager.cpp:217**************

Result = m_UserDirectorySessionList.Find(Index, SessionResult);

******************************

Where m_UserDirectorySessionList is of type 

C2<C1>   m_UserDirectorySessionList;


And C2::Find function is in DbUtilities.h

template <class T>
class C2
{
private:
        CObArray<T, T&>                           m_ValueList;
public:
 	.
	.
	.       
	long C2::Find(long Index, T& Item)
                {
                Item = m_ValueList.GetAt(Index);
                }

}


What coud be the possible error?

-Ajay

             reply	other threads:[~2003-01-23 12:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-23 12:52 Ajay Bansal [this message]
2003-01-23 13:11 ` John Love-Jensen
2003-01-23 13:13 no matching function for call to ``vector<C1, allocator<C1>>::at " Ajay Bansal
2003-01-23 13:18 ` John Love-Jensen
2003-01-23 13:20 no matching function for call to ``vector<C1,allocator<C1>>::at " Ajay Bansal
2003-01-23 13:27 ` John Love-Jensen
2003-01-23 18:12 no matching function for call to``vector<C1,allocator<C1>>::at " Ajay Bansal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2B721C6525F0D411B1E900B0D0226BDDFD2313@mohmsg01.ad.infosys.com \
    --to=ajay_bansal@infosys.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).