{"action":"created","issue":{"url":"https://api.github.com/repos/philsquared/Catch/issues/880","repository_url":"https://api.github.com/repos/philsquared/Catch","labels_url":"https://api.github.com/repos/philsquared/Catch/issues/880/labels{/name}","comments_url":"https://api.github.com/repos/philsquared/Catch/issues/880/comments","events_url":"https://api.github.com/repos/philsquared/Catch/issues/880/events","html_url":"https://github.com/philsquared/Catch/issues/880","id":219190947,"number":880,"title":"INFO macro isn't compiled with types from std","user":{"login":"KVic","id":4884373,"avatar_url":"https://avatars1.githubusercontent.com/u/4884373?v=3","gravatar_id":"","url":"https://api.github.com/users/KVic","html_url":"https://github.com/KVic","followers_url":"https://api.github.com/users/KVic/followers","following_url":"https://api.github.com/users/KVic/following{/other_user}","gists_url":"https://api.github.com/users/KVic/gists{/gist_id}","starred_url":"https://api.github.com/users/KVic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KVic/subscriptions","organizations_url":"https://api.github.com/users/KVic/orgs","repos_url":"https://api.github.com/users/KVic/repos","events_url":"https://api.github.com/users/KVic/events{/privacy}","received_events_url":"https://api.github.com/users/KVic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2017-04-04T09:30:49Z","updated_at":"2017-04-24T20:38:06Z","closed_at":null,"body":"## Description\r\nThe compilation error occurs in the INFO macro with some type from std namespace. It seems that operator << overload for std::ostream doesn't work properly for a types from std namespace in the INFO macro.\r\n\r\n### Steps to reproduce\r\n```\r\n#define CATCH_CONFIG_MAIN\r\n#include \"catch.hpp\"\r\n#include <chrono>\r\n\r\nusing SomeStdType = std::chrono::system_clock::time_point;\r\n\r\nstd::ostream& operator << ( std::ostream& os, SomeStdType const& std_value )\r\n{\r\n    os << \"std type convertion\"; // << std_value\r\n    return os;\r\n}\r\n\r\nTEST_CASE( \"INFO of SomeStdType\" )\r\n{\r\n    SomeStdType std_value;\r\n    INFO( \"std_value = \" << std_value );\r\n    CHECK( std_value == SomeStdType() );\r\n}\r\n```\r\n```\r\ncatch.hpp:1970: error: no match for 'operator<<' (operand types are 'std::ostringstream {aka std::__cxx11::basic_ostringstream<char>}' and 'const std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long long int, std::ratio<1ll, 1000000000ll> > >')\r\n             m_stream << value;\r\n             ~~~~~~~~~^~~~~~~~\r\n```\r\n\r\n### Extra information\r\n* Catch version: **v1.8.2**\r\n* Operating System: **Windows 7 x64**\r\n* Compiler+version: **mingw 5.3.0 32bit, mingw 6.3.0 32bit, msvc 2015 32bit**\r\n"},"comment":{"url":"https://api.github.com/repos/philsquared/Catch/issues/comments/296815089","html_url":"https://github.com/philsquared/Catch/issues/880#issuecomment-296815089","issue_url":"https://api.github.com/repos/philsquared/Catch/issues/880","id":296815089,"user":{"login":"horenmar","id":9026413,"avatar_url":"https://avatars2.githubusercontent.com/u/9026413?v=3","gravatar_id":"","url":"https://api.github.com/users/horenmar","html_url":"https://github.com/horenmar","followers_url":"https://api.github.com/users/horenmar/followers","following_url":"https://api.github.com/users/horenmar/following{/other_user}","gists_url":"https://api.github.com/users/horenmar/gists{/gist_id}","starred_url":"https://api.github.com/users/horenmar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/horenmar/subscriptions","organizations_url":"https://api.github.com/users/horenmar/orgs","repos_url":"https://api.github.com/users/horenmar/repos","events_url":"https://api.github.com/users/horenmar/events{/privacy}","received_events_url":"https://api.github.com/users/horenmar/received_events","type":"User","site_admin":false},"created_at":"2017-04-24T20:38:06Z","updated_at":"2017-04-24T20:38:06Z","body":"I haven't had time to keep up properly and the exact ADL rules tend to make me cross-eyed :smile:\r\n\r\nAnyway, I think that explicitly pulling in global `operator<<` before performing the ADL lookup is preferable to poluting global namespace with weirdly named function, and should have the same results.\r\n\r\n\r\nThere would still be issues in Catch with ADL calls, IIRC `toString` is usually called qualified as `Catch::toString`, even in places where it is supposed to be a customization point, but that can be solved later."}}
{"actor":{"display_login":"horenmar"}}