Saturday, April 13, 2013

Unused parameter

You can cast function parameters to void to avoid "unused parameter" compile warnings.
iterator find(const Data& item) const {
 (void) item;
 return iterator(nullptr);
}

Assuming your question was asked given that everything already does compile, I would say code in an order that makes sense to you. Hint: think about incremental testability. The more pieces of functionality you can test along the way, the less time you will spend debugging.

No comments:

Post a Comment