c++ - Visual Studio 2015: is a set of const pointers allowed? -


we upgrading vs2015 soon, , found in breaking changes list:

const elements

the c++ standard has forbidden containers of const elements (such vector or set). visual c++ 2013 , earlier accepted such containers. in current version, such containers fail compile.

source

i wondering if knows if applies set. know map can still contain const pointers keys, since const anyway.

an example:

std::set<const qobject*> 

can still this? think not, according post on site of microsoft.

const qobject* pointer to a const qobject. pointer still modifiable. const qobject* const make pointer const.

since microsoft article talks const objects, const qobject* not, example fine.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -