News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

C++11 code completion (CC) doesn't work with list-initialization

Started by Dert, August 07, 2014, 05:20:03 PM

Previous topic - Next topic

Dert

Windows 7 64-bit
Latest MinGW installed using this guide
C::B svn 9854

C++11 CC is enabled and works
(here is confirmation:

http://s24.postimg.org/b55qqbh6d/c_11_cc_enabled_confirm.png
)

Here's what i get when tried to use C++11's list-initialization (with "=" CC works, without - no):

http://s8.postimg.org/n4dy10ovp/c_11_with_equal.png http://s8.postimg.org/hrp3mw0z9/c_11_without_equal.png

So list-initialization currently isn't supported with CC? Is there any way to get it?

nanyu

 list<int> lst_1  {1, 2,  3};
lst_1.     //  <-- cc doesn't show any hint..

list<int> lst_2 = {1, 2, 3};
lst_2.   // <- cc do work well ....
====
windows 10, mingw , c::b svn 10503

ollydbg

Quote from: nanyu on October 10, 2015, 04:08:55 PM
list<int> lst_1  {1, 2,  3};
lst_1.     //  <-- cc doesn't show any hint..

list<int> lst_2 = {1, 2, 3};
lst_2.   // <- cc do work well ....
====
windows 10, mingw , c::b svn 10503
A known bug, I have add this post here: Code::Blocks / Tickets / #33 C++11 Initializer lists fool code completion
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.