insert in std::map does not insert the object

S

simon.elbaz

Hi,
i use the following map:

std::map<Key, std::vector< std::string >, KeyCmp > mSQLElem;

The following code does not insert the newly created pair:
std::vector<std::string> vcTemp;
vcTemp.push_back("test string");
mSQLBody.insert(std::make_pair(Key(stKey, mSQLBody.size(),
b_is_key_unique), std::vector< std::string >(vcTemp)));

Thanks for your help!
Simon

////////////////////////////////////////////

The Key class is:
class Key {
public:
std::string stKeyName;
bool bFilled;
bool b_is_unique; // should this node be unique in the pattern
int iPosition;

Key(std::string a_stKeyName, int a_iPosition=-1, bool
a_b_is_unique=false) : stKeyName(a_stKeyName), iPosition(a_iPosition),
bFilled(false), b_is_unique(a_b_is_unique)
{}

Key(const Key &a_key);
Key &operator=(const Key &a_key);
void clear();
};

and KeyCmp class:
class KeyCmp {
public:
bool operator()(Key const &, Key const &) const;
};
 
S

simon.elbaz

My question is no more valid: I was looking at the wrong part of code.
Sorry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top