hof
hof copied to clipboard
Consider using {} instead of () when constructing objects in samples
For example, in this:
struct id
{
template<class T>
T operator()(T x) const
{
return x;
}
};
auto int_result = boost::fit::result<int>(id());
static_assert(std::is_same<decltype(int_result(true)), int>::value, "Not the same type");
Consider changing the second-to-last line to:
auto int_result = boost::fit::result<int>(id{});
This makes it obvious that the use of "id" is a construction, not a call.