473,406 Members | 2,281 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Error compiling c++ application

Does anyone know how to deal with the following error:

"ClsGetAllRepository.cpp", line 158: Error: Could not find a match for
std::multimap<RssLocalRepository::ClsRssObject*,
RssLocalRepository::ClsRssUser*,
RssLocalRepository::ClsGetAllRepository::RssObject PtrCompare,
std::allocator<std::pair<RssLocalRepository::ClsRs sObject*const,
RssLocalRepository::ClsRssUser*>>>::insert(std::pa ir<RssLocalRepository::ClsRssObject*,
RssLocalRepository::ClsRssUser*>).
Jul 19 '05 #1
4 1824
"Einat d" <ei*********@bmc.com> wrote in message
news:f0*************************@posting.google.co m...
| Does anyone know how to deal with the following error:
|
| "ClsGetAllRepository.cpp", line 158: Error: Could not find a match for
| std::multimap<RssLocalRepository::ClsRssObject*,
| RssLocalRepository::ClsRssUser*,
| RssLocalRepository::ClsGetAllRepository::RssObject PtrCompare,
| std::allocator<std::pair<RssLocalRepository::ClsRs sObject*const,
|
RssLocalRepository::ClsRssUser*>>>::insert(std::pa ir<RssLocalRepository::Cls
RssObject*,
| RssLocalRepository::ClsRssUser*>).

It would help if you posted at least the line of code that triggered the
error,
and some surrounding code, if not a complete file.

You might need to explicitly specify the type of the parameter to a call to
MyMap::insert().
E.g.:
myMapVar.insert(MyMap::value_type(objPtr,userPtr))
instead of:
myMapVar.insert(std::make_pair(objPtr,userPtr))

But this is a wild guess given the amount of information you provided...

hth
--
http://ivan.vecerina.com
Brainbench MVP for C++ <> http://www.brainbench.com
Jul 19 '05 #2
Here is the code that generated the error:

void ClsGetAllRepository::InsertConnection(
const ClsRssObject &group,
const ClsRssUser &user
)
{
// first we insert the user to users pool and the group to the group
pool
RssObjectPoolInsertionPair groupInserPair =
m_groupPool.insert(group);
RssUserPoolInsertionPair userInserPair = m_userPool.insert(user);

m_connectionPool.insert(std::make_pair(&*groupInse rPair.first,

&*userInserPair.first));
}

The last line is the source of the message.

Here is a portion of the H file definition:

ConnectionPool m_connectionPool;

typedef allocator<pair<RssLocalRepository::ClsRssObject*,R ssLocalRepository::ClsRssUser*
ConnectionAllocator;


typedef multimap<ClsRssObject*,
ClsRssUser*,
RssObjectPtrCompare,
ConnectionAllocator > ConnectionPool;

Is there anything else I can post ?
Jul 19 '05 #3
Hi Einat,
"Einat d" <ei*********@bmc.com> wrote in message
news:f0**************************@posting.google.c om...
| typedef multimap<ClsRssObject*,
| ClsRssUser*,
| RssObjectPtrCompare,
| ConnectionAllocator > ConnectionPool;
|
| Is there anything else I can post ?

Have you tried the fix I suggested in my previous post:
myMapVar.insert(MyMap::value_type(objPtr,userPtr))


Specifically, based on the code you've now posted,
replace:
| m_connectionPool.insert(std::make_pair(
| &*groupInserPair.first, &*userInserPair.first));

with:
m_connectionPool.insert(ConnectionPool::value_type (
&*groupInserPair.first, &*userInserPair.first));

Even if this doesn't work, it should at least provide
you with a somewhat easier error message.
You always need to be careful with std::make_pair,
because subtle differences in the template parameters
of std::pair can create incompatible types.

In your library implementation, I think the map template
implicitly adds a const on the first type (which is
correct, though debated). And this might be causing
the error...
I hope this helps,
Ivan
--
http://ivan.vecerina.com
Jul 19 '05 #4
Seems like it solved the problem.

I am ever so grateful.

Thank You
Einat
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: RichG | last post by:
I have a problem where DB2 is returning error 'DIA9999E An internal error occurred. Report the following error code : "error code -32"'. This is happening on DB2 for Windows, v7.2.9 when compiling...
1
by: Avery Fong | last post by:
The following program will result in a compile error when building under Debug but will compile under Release. Why does is work under Release mode but not under Debug This program is developed...
2
by: Qiao Yun | last post by:
I used vc++.net (visual studio .net ) to open a project which can work well in vc++6.0. I succeeded in compiling the project in vc++.net in release mode . But when I tried to compile the project...
25
by: n3crius | last post by:
hi, i just got a web host with asp.net , seemed really cool. aspx with the c# or vb IN the actual main page run fine, but when i use codebehind and make another source file ( a .cs) to go with...
8
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This Custom validator is used for comparing a value enterd by the user against the primary key in the SQL database. IF the...
4
by: Al Williams | last post by:
Hi, I have error handling in place throughout my application. I also start the application wrapped in error handling code to catch any unexpected exceptions (i.e. exceptions that occur where I...
0
by: Herman Jones | last post by:
I'm getting the following error when I build a Class Library project: Embedding manifest... Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\system32\cmd.exe'. It happens with...
2
by: f rom | last post by:
----- Forwarded Message ---- From: Josiah Carlson <jcarlson@uci.edu> To: f rom <etaoinbe@yahoo.com>; wxpython-users@lists.wxwidgets.org Sent: Monday, December 4, 2006 10:03:28 PM Subject: Re: ...
3
RobH
by: RobH | last post by:
I am trying to generate a complied version of my Application by clicking on the "Make ACCDE" in Access 2007. It asks me where and with what file name to save the ACCDE however it quickly returns with...
5
by: kp | last post by:
Hi, I am compiling on an AIX 5.1 box and my test machine is AIX 5.3. I run the foll. steps for compiling my test binary "test" /usr/vacpp/bin/xlC test.c -c -o test.o -I/home/jag/progs/include...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.