News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Not coherent highlighting in Code::Blocks

Started by jalcazo, October 20, 2021, 11:16:58 AM

Previous topic - Next topic

jalcazo

Hi, when using smart pointers with Code::Blocks and C++ you see that make_shared is highlighted in bold green:



However make_unique is not highlighted at all:



Nevertheless shared_ptr and unique_ptr are correctly highlighted:



As you can see:



Why is this happening? unique pointers and shared pointers are "equal" in importance, no?

Miguel Gimenez

It is missing in the default syntax highlighting set. You can add that and make_unique_for_overwrite:

Go to Settings -> Editor -> Syntax highlighting
In "Sytnax highlighting for" select C/C++
Click on Keywords
Select set 2
Insert make_unique and make_unique_for_overwrite in alphabetical order
Close settings

jalcazo

Thank you. But it will be added for next Code::Blocks version by default?

BTW, when is that scheduled? There' somewhere I can subscribe to be warned when next Code::Blocks version launches? (mailing list or something).

Miguel Gimenez

I have just posted a patch in ticket 1146, but I don't know if/when it will be added.

I dont know about the next release, but if you are using Windows you can use the last nightly.

jalcazo

Thanks Miguel, I tried to thank you earlier but there was some kind of problem replying in the forums. Let's see if this time works.