C++ compile time function execution

后端 未结 6 1665
醉酒成梦
醉酒成梦 2021-01-02 02:41

I have string tags in my code that are converted to numbers and used to search values in a tag-value structure.

I have something like this:

void foo(         


        
6条回答
  •  Happy的楠姐
    2021-01-02 03:36

    I know it is probably not fashionable, but you can generate a hash-table ahead of time. I like to use gperf to generate the plumbing there.

    I know know. You wanted something to make compilation last longer... Just saying :)

提交回复
热议问题