{"action":"opened","issue":{"url":"https://api.github.com/repos/mlpack/mlpack/issues/422","labels_url":"https://api.github.com/repos/mlpack/mlpack/issues/422/labels{/name}","comments_url":"https://api.github.com/repos/mlpack/mlpack/issues/422/comments","events_url":"https://api.github.com/repos/mlpack/mlpack/issues/422/events","html_url":"https://github.com/mlpack/mlpack/issues/422","id":63181749,"number":422,"title":"Error Compiling Triangular_kernel.hpp on Windows","user":{"login":"theSundayProgrammer","id":317491,"avatar_url":"https://avatars.githubusercontent.com/u/317491?v=3","gravatar_id":"","url":"https://api.github.com/users/theSundayProgrammer","html_url":"https://github.com/theSundayProgrammer","followers_url":"https://api.github.com/users/theSundayProgrammer/followers","following_url":"https://api.github.com/users/theSundayProgrammer/following{/other_user}","gists_url":"https://api.github.com/users/theSundayProgrammer/gists{/gist_id}","starred_url":"https://api.github.com/users/theSundayProgrammer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theSundayProgrammer/subscriptions","organizations_url":"https://api.github.com/users/theSundayProgrammer/orgs","repos_url":"https://api.github.com/users/theSundayProgrammer/repos","events_url":"https://api.github.com/users/theSundayProgrammer/events{/privacy}","received_events_url":"https://api.github.com/users/theSundayProgrammer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-20T07:33:36Z","updated_at":"2015-03-20T07:33:36Z","closed_at":null,"body":"In triangular_kernel.hpp (line 657) the following function fails to compile as it is using the max macro from a windows header. \r\n double Evaluate(const double distance) const\r\n  {\r\n    return std::max(0.0, (1 - distance) / bandwidth);\r\n  }\r\n\r\nThe workaround is to add\r\n#ifdef max\r\n#undef max\r\n#endif\r\nclose to the top of the file\r\n"}}