{"action":"opened","issue":{"url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/135","repository_url":"https://api.github.com/repos/matus-chochlik/oglplus","labels_url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/135/labels{/name}","comments_url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/135/comments","events_url":"https://api.github.com/repos/matus-chochlik/oglplus/issues/135/events","html_url":"https://github.com/matus-chochlik/oglplus/issues/135","id":180363060,"number":135,"title":"std::numeric_limits<T>::max()) conflicts with max macro defined in Windows.h","user":{"login":"htmlboss","id":5572045,"avatar_url":"https://avatars.githubusercontent.com/u/5572045?v=3","gravatar_id":"","url":"https://api.github.com/users/htmlboss","html_url":"https://github.com/htmlboss","followers_url":"https://api.github.com/users/htmlboss/followers","following_url":"https://api.github.com/users/htmlboss/following{/other_user}","gists_url":"https://api.github.com/users/htmlboss/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlboss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlboss/subscriptions","organizations_url":"https://api.github.com/users/htmlboss/orgs","repos_url":"https://api.github.com/users/htmlboss/repos","events_url":"https://api.github.com/users/htmlboss/events{/privacy}","received_events_url":"https://api.github.com/users/htmlboss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-30T17:48:47Z","updated_at":"2016-09-30T17:48:47Z","closed_at":null,"body":"Hi again!\r\n\r\nI just wanted to let you know that I stumbled across a nasty macro conflict on line 51 of size.hpp:\r\n`if(v > X(std::numeric_limits<T>::max()))`. ([http://stackoverflow.com/a/27443191/2231969](http://stackoverflow.com/a/27443191/2231969))\r\n\r\nWindows has a macro called `max` in Windows.h that does this:\r\n```\r\n#ifndef max\r\n#define max(a,b)            (((a) > (b)) ? (a) : (b))\r\n#endif\r\n```\r\nAnd naturally my VS Intellisense got confused and thought it was referring to the STL member...but the compiler said otherwise :P\r\n\r\nAll I needed to do was just add to the top of size.hpp:\r\n```\r\n#ifdef max\r\n\t//#undef max\r\n#endif\r\n```\r\nNot sure if this is the only instance of that function call or if this the best way to get around it.\r\nI know...WinAPI is **dumb** >.>"}}
{"actor":{"display_login":"htmlboss"}}