Attempt to auto-detect operator() when writing custom type