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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
Developer
nicklas
Posts: 124
Registered: ‎02-01-2009
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

 

Please use plain text.
New Member
zaiggen
Posts: 1
Registered: ‎12-13-2012
My Carrier: ATT

Re: Code compilation issue on NDK BB10_0_06

To solve this include both

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

 

Cheers!

Please use plain text.
Regular Contributor
robinhuang
Posts: 52
Registered: ‎02-08-2013
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

Please use plain text.
Developer
Zmey
Posts: 886
Registered: ‎12-18-2012

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

Please use plain text.