Import / research / string-tables /
@John Ryland John Ryland authored on 22 Dec 2020
..
.vscode add new projects 5 years ago
.gitignore add new projects 5 years ago
CMakeLists.txt add new projects 5 years ago
FixedStrings.cpp add new projects 5 years ago
FixedStrings.h add new projects 5 years ago
README.md add new projects 5 years ago
main.cpp add new projects 5 years ago
program.cpp add new projects 5 years ago
README.md

StringsTableTest

A fixed-string is a compile time string which is stored in the read only section of the executable and is available as an int. The mapping is fixed at compile time. The retrieval of the static string that the id maps to is thread safe.

This test shows how this can be integrated with cmake to be able to at compile time find all the strings and place them in the strings table.

This could be useful for a fixed size union that contains various types as well as string ids which refer to fixed strings.