Author Topic: Not coherent highlighting in Code::Blocks  (Read 2519 times)

Offline jalcazo

  • Multiple posting newcomer
  • *
  • Posts: 23
Not coherent highlighting in Code::Blocks
« 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:



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?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 836
Re: Not coherent highlighting in Code::Blocks
« Reply #1 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

Offline jalcazo

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Not coherent highlighting in Code::Blocks
« Reply #2 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).

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 836
Re: Not coherent highlighting in Code::Blocks
« Reply #3 on: October 20, 2021, 12:57:33 pm »
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.

Offline jalcazo

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: Not coherent highlighting in Code::Blocks
« Reply #4 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.