Skip to content

Consider changing UnitTest::Check signature to take value by const reference. #7

Closed
@pjohnmeyer

Description

@pjohnmeyer

From https://sourceforge.net/tracker/?func=detail&aid=2604261&group_id=158151&atid=806684

As of v.1.4, UnitTest::Check() takes a value by copy, however, due to copy constructors, calling this function can have side effects. I feel it is preferable to pass the value by reference, e.g.

template <typename Value>
Check (Value const& value) {
return !!value;
}

This appears to be an inconsistency with the changes from r178 on sourceforge.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions