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
nicklas
Posts: 150
Registered: ‎02-01-2009
My Device: Torch, PlayBook and Dev Alpha

Re: Code compilation issue on NDK BB10_0_06

Hi,

 

I have created an issue :

 

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

 

Nicolas

 

New Member
zaiggen
Posts: 1
Registered: ‎12-13-2012
My Device: BB10 Alpha 1

Re: Code compilation issue on NDK BB10_0_06

To solve this include both

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

 

Cheers!

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

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
Zmey
Posts: 1,514
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

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