{"action":"closed","issue":{"url":"https://api.github.com/repos/eranpeer/FakeIt/issues/49","labels_url":"https://api.github.com/repos/eranpeer/FakeIt/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/eranpeer/FakeIt/issues/49/comments","events_url":"https://api.github.com/repos/eranpeer/FakeIt/issues/49/events","html_url":"https://github.com/eranpeer/FakeIt/issues/49","id":109330571,"number":49,"title":"Formatter could format more types","user":{"login":"coombez","id":14299031,"avatar_url":"https://avatars.githubusercontent.com/u/14299031?v=3","gravatar_id":"","url":"https://api.github.com/users/coombez","html_url":"https://github.com/coombez","followers_url":"https://api.github.com/users/coombez/followers","following_url":"https://api.github.com/users/coombez/following{/other_user}","gists_url":"https://api.github.com/users/coombez/gists{/gist_id}","starred_url":"https://api.github.com/users/coombez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coombez/subscriptions","organizations_url":"https://api.github.com/users/coombez/orgs","repos_url":"https://api.github.com/users/coombez/repos","events_url":"https://api.github.com/users/coombez/events{/privacy}","received_events_url":"https://api.github.com/users/coombez/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-01T15:58:47Z","updated_at":"2015-10-30T11:23:51Z","closed_at":"2015-10-30T11:23:51Z","body":"In my project I've replaced your formatter with the following, which allows any type with the standard `operator<<` defined to be formatted, including my custom types.  Just sharing in case you like it.  Feel free to use or discard as you please.\r\n\r\n```\r\ntemplate <typename T>\r\nstruct Formatter\r\n{\r\n  static auto format(T const &val) -> decltype((std::cout << val), std::string())\r\n  {\r\n    std::ostringstream os;\r\n    os << val;\r\n    return os.str();\r\n  }\r\n\r\n  static std::string format(...)\r\n  {\r\n    return \"?\";\r\n  }\r\n};\r\n```"}}