Ways to show your co-programmers that some methods are not yet implemented in a class when programming in C++

后端 未结 7 1588
生来不讨喜
生来不讨喜 2021-02-15 04:02

What approaches can you use when:

  • you work with several (e.g. 1-3) other programmers over a small C++ project, you use a single repository
  • you create a class,
7条回答
  •  甜味超标
    2021-02-15 04:42

    I actually like the concept from .Net of a NotImplementedException. You can easily define your own, deriving from std::exception, overriding what as "not implemented".

    It has the advantages of:

    1. easily searchable.
    2. allows current & dependent code to compile
    3. can execute up to the point the code is needed, at which point, you fail (and you immediately have an execution path that demonstrates the need).
    4. when it fails, it fails to a know state, so long as you're not blanketly swallowing exceptions, rather than relying upon indeterminable state.

提交回复
热议问题