C++ header-only template library

后端 未结 9 2101
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-09 20:21

Looking at this project (http://www.savarese.com/software/libssrckdtree/) I found the definition \"C++ header-only template library\". At the moment I have basic C++ knowled

9条回答
  •  -上瘾入骨i
    2020-12-09 21:12

    It means that all of the code is in header files; there are no libraries associated with the library. What that means in practice depends—in the worst case, it means that the author has never even compiled the code:-). Most likely, it means that the code has never been tested with the exact combination of compiler, version and options that you use, and that compile times will shoot way up. On the other hand, it means that you can use the library even if the author doesn't have access to the same compiler as you, and you're not forced to use whatever options he used when he compiled the library. Or alternatively, if it is open source, you don't have to build the library yourself.

提交回复
热议问题