Equivalent of #region for C++

前端 未结 10 1219
無奈伤痛
無奈伤痛 2020-12-24 04:17

What\'s the C++ equivalent of #region for C++ so I can put in custom code collapsible bits and make my code a little easier to read?

10条回答
  •  一个人的身影
    2020-12-24 04:45

    Kate, KDevelop and all other text editors and IDEs which use Katepart supports marking regions with //BEGIN and //END markers.

    // BEGIN GPT entity types
    #define GPT_ENT_TYPE_UNUSED \
        {0x00000000,0x0000,0x0000,0x00,0x00,{0x00,0x00,0x00,0x00,0x00,0x00}}
    #define GPT_ENT_TYPE_EFI \
        {0xc12a7328,0xf81f,0x11d2,0xba,0x4b,{0x00,0xa0,0xc9,0x3e,0xc9,0x3b}}
    #define GPT_ENT_TYPE_MBR \
        {0x024dee41,0x33e7,0x11d3,0x9d,0x69,{0x00,0x08,0xc7,0x81,0xf3,0x9f}}
    // END
    

    You will be able to collapse a region defined in such way.

提交回复
热议问题