C++ header-only template library

后端 未结 9 2102
佛祖请我去吃肉
佛祖请我去吃肉 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条回答
  •  一整个雨季
    2020-12-09 21:11

    For template libraries, it's possible to provide all of the functionality in just header (.h files) because traditionally compilers needed the full definition of the template class in order to instantiate for a given type. There is nothing to put in a library unless the library is going to provide pre-instantiated versions or if there is some portion of the template library that doesn't need to be templated.

提交回复
热议问题