Automatically split (refactor) .h into header and implementation (h+cpp)

前端 未结 4 1408
花落未央
花落未央 2021-01-02 00:06

When writing C++ code, I often start by writing full \'implementation\' code in my header files, then later need to refactor the implementation into a .cpp file.

Th

4条回答
  •  粉色の甜心
    2021-01-02 00:30

    There is Lazy C++ where you only write one .lzz file and it generates .h and .cpp for you.

    I am really looking forward for C++ modules where you only write .cpp and the import file is generated automatically. But we will have to wait for a few years even though Clang has started to implement modules. Here are some examples.

提交回复
热议问题