开发者

Excess elements in scalar initializer

(Updated with more code details)

I'm pretty noobish when it comes to C++ STL stuff.

开发者_开发技巧After a compiler (LLVM GCC 4.2) upgrade, I'm getting:

error: Semantic Issue: Excess elements in scalar initializer

on the call:

Certificate *tempcert;
certMap cm;

cm.insert( cValType( tempcert->id, tempcert ) ); 

with a typedef of:

typedef std::map< string, certificate* > certMap;
typedef std::map< string, certificate* >::value_type cValType;

I'm not certain what this error is telling me or how to fix it. (Ok, I realize it's telling me excess elements, but it looks like it matches the map prototype to me, so I'm confused.)

Suggestions?


It appears the confusion around this question was caused by buggy error messages in Xcode 4.

After replacing a shared library generating errors (which were below the error in question), the error went away.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜