{"action":"created","issue":{"url":"https://api.github.com/repos/HowardHinnant/date/issues/87","repository_url":"https://api.github.com/repos/HowardHinnant/date","labels_url":"https://api.github.com/repos/HowardHinnant/date/issues/87/labels{/name}","comments_url":"https://api.github.com/repos/HowardHinnant/date/issues/87/comments","events_url":"https://api.github.com/repos/HowardHinnant/date/issues/87/events","html_url":"https://github.com/HowardHinnant/date/issues/87","id":177366697,"number":87,"title":"Including Windows.h before date.h causes compile error","user":{"login":"gabm","id":482105,"avatar_url":"https://avatars.githubusercontent.com/u/482105?v=3","gravatar_id":"","url":"https://api.github.com/users/gabm","html_url":"https://github.com/gabm","followers_url":"https://api.github.com/users/gabm/followers","following_url":"https://api.github.com/users/gabm/following{/other_user}","gists_url":"https://api.github.com/users/gabm/gists{/gist_id}","starred_url":"https://api.github.com/users/gabm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabm/subscriptions","organizations_url":"https://api.github.com/users/gabm/orgs","repos_url":"https://api.github.com/users/gabm/repos","events_url":"https://api.github.com/users/gabm/events{/privacy}","received_events_url":"https://api.github.com/users/gabm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-16T08:04:53Z","updated_at":"2016-09-16T15:06:12Z","closed_at":null,"body":"I'm working with VS2015 Update 3 in Visual C++. When I write:\r\n\r\n```\r\n#include <Windows.h>\r\n#include \"date.h\"\r\n```\r\n\r\nI get an error here:\r\n```\r\nclass year\r\n{\r\n    short y_;\r\n\r\npublic:\r\n    explicit CONSTCD11 year(int y) NOEXCEPT;\r\n\r\n    CONSTCD14 year& operator++()    NOEXCEPT;\r\n    CONSTCD14 year  operator++(int) NOEXCEPT;\r\n    CONSTCD14 year& operator--()    NOEXCEPT;\r\n    CONSTCD14 year  operator--(int) NOEXCEPT;\r\n\r\n    CONSTCD14 year& operator+=(const years& y) NOEXCEPT;\r\n    CONSTCD14 year& operator-=(const years& y) NOEXCEPT;\r\n\r\n    CONSTCD11 bool is_leap() const NOEXCEPT;\r\n\r\n    CONSTCD11 explicit operator int() const NOEXCEPT;\r\n    CONSTCD11 bool ok() const NOEXCEPT;\r\n\r\n    static CONSTCD11 year min() NOEXCEPT; // <-------- error is here...\r\n    static CONSTCD11 year max() NOEXCEPT;\r\n};\r\n```\r\n\r\n```\r\nwarning C4003: not enough actual parameters for macro 'min'\r\ndate.h(323): error C2059: syntax error: '('\r\ndate.h(323): error C2143: syntax error: missing ',' before '?'\r\n```\r\n\r\nI'm not sure whether this is a relevant bug, because similar things also happen with other libraries. Switching the order of the includes solves the problem (date before Windows)"},"comment":{"url":"https://api.github.com/repos/HowardHinnant/date/issues/comments/247624898","html_url":"https://github.com/HowardHinnant/date/issues/87#issuecomment-247624898","issue_url":"https://api.github.com/repos/HowardHinnant/date/issues/87","id":247624898,"user":{"login":"nabijaczleweli","id":6709544,"avatar_url":"https://avatars.githubusercontent.com/u/6709544?v=3","gravatar_id":"","url":"https://api.github.com/users/nabijaczleweli","html_url":"https://github.com/nabijaczleweli","followers_url":"https://api.github.com/users/nabijaczleweli/followers","following_url":"https://api.github.com/users/nabijaczleweli/following{/other_user}","gists_url":"https://api.github.com/users/nabijaczleweli/gists{/gist_id}","starred_url":"https://api.github.com/users/nabijaczleweli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nabijaczleweli/subscriptions","organizations_url":"https://api.github.com/users/nabijaczleweli/orgs","repos_url":"https://api.github.com/users/nabijaczleweli/repos","events_url":"https://api.github.com/users/nabijaczleweli/events{/privacy}","received_events_url":"https://api.github.com/users/nabijaczleweli/received_events","type":"User","site_admin":false},"created_at":"2016-09-16T15:06:12Z","updated_at":"2016-09-16T15:06:12Z","body":"Agreed, this should be dealt with by usercode"}}
{"actor":{"display_login":"nabijaczleweli"}}