Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 154
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha
My Carrier: SFR

Re: Code compilation issue on NDK BB10_0_06

Hi,

 

I have created an issue :

 

https://www.blackberry.com/jira/browse/BBTEN-397

 

Nicolas

 

Highlighted
New Member
Posts: 1
Registered: ‎12-13-2012
My Device: BB10 Alpha 1
My Carrier: ATT

Re: Code compilation issue on NDK BB10_0_06

To solve this include both

#include <string.h>
#include <string>

 

Cheers!

Regular Contributor
Posts: 52
Registered: ‎02-08-2013
My Device: Z10
My Carrier: Rogers

Re: Code compilation issue on NDK BB10_0_06

[ Edited ]

I had the same whenever using std:map<const std::string, std::string>.  any idea? my SDK is 10.0.9.2372. And #include <string.h> doesn't help

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: Code compilation issue on NDK BB10_0_06

[ Edited ]

@robinhuang,
Marking the key as const isn't really needed. It can't be modified via map's public interface anyway.

I guess if map implementation uses assignment operator internally, then passing a constant key to it will not work. Maybe older implementation was using a copy constructor.

 

 

UPD:

> >>From the C++ standard:
> >>    Table 69 in 23.1.2, p7, says that
> >>    X::key_type must be assignable;

From this discussion:

http://gcc.gnu.org/ml/gcc/2000-05/msg00095.html


Andrey Fidrya, @zmeyc on twitter