Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: jalcazo on October 20, 2021, 11:16:58 am

Title: Not coherent highlighting in Code::Blocks
Post by: jalcazo on October 20, 2021, 11:16:58 am
Hi, when using smart pointers with Code::Blocks and C++ you see that make_shared is highlighted in bold green:

(https://i.ibb.co/dL64hM0/esborrar1.png)

However make_unique is not highlighted at all:

(https://i.ibb.co/48DNgp0/esborrar2.png)

Nevertheless shared_ptr and unique_ptr are correctly highlighted:

(https://i.ibb.co/CMW2cqg/esborrar3.png)

As you can see:

(https://i.ibb.co/Ny1TbQC/esborrar4.png)

Why is this happening? unique pointers and shared pointers are "equal" in importance, no?
Title: Re: Not coherent highlighting in Code::Blocks
Post by: Miguel Gimenez on October 20, 2021, 11:43:11 am
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
Title: Re: Not coherent highlighting in Code::Blocks
Post by: jalcazo on October 20, 2021, 12:42:46 pm
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).
Title: Re: Not coherent highlighting in Code::Blocks
Post by: Miguel Gimenez on October 20, 2021, 12:57:33 pm
I have just posted a patch in ticket 1146 (https://sourceforge.net/p/codeblocks/tickets/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 (https://forums.codeblocks.org/index.php/topic,24667.0.html).
Title: Re: Not coherent highlighting in Code::Blocks
Post by: jalcazo on November 08, 2021, 06:27:01 am
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.