{"action":"opened","issue":{"url":"https://api.github.com/repos/mapbox/variant/issues/149","repository_url":"https://api.github.com/repos/mapbox/variant","labels_url":"https://api.github.com/repos/mapbox/variant/issues/149/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/variant/issues/149/comments","events_url":"https://api.github.com/repos/mapbox/variant/issues/149/events","html_url":"https://github.com/mapbox/variant/issues/149","id":228029115,"number":149,"title":"Compilation problems with clang on windows","user":{"login":"usernameiwantedwasalreadytaken","id":27699948,"avatar_url":"https://avatars0.githubusercontent.com/u/27699948?v=3","gravatar_id":"","url":"https://api.github.com/users/usernameiwantedwasalreadytaken","html_url":"https://github.com/usernameiwantedwasalreadytaken","followers_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/followers","following_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/following{/other_user}","gists_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/gists{/gist_id}","starred_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/subscriptions","organizations_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/orgs","repos_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/repos","events_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/events{/privacy}","received_events_url":"https://api.github.com/users/usernameiwantedwasalreadytaken/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-05-11T15:21:07Z","updated_at":"2017-05-11T15:21:07Z","closed_at":null,"body":"I tried to compile this simple program with clang 3.8.0 on Windows 10 (using MSVC 2017 headers):\r\n\r\n```cpp\r\n#include <iostream>\r\n#include \"mapbox/variant.hpp\"\r\n\r\nint main() {\r\n  using namespace std;\r\n  using myvar = mapbox::util::variant<int, double>;\r\n\r\n  myvar m;\r\n\r\n  cout << \"ok\" << endl;\r\n  return 0;\r\n}\r\n```\r\n\r\nBut I've got the following errors:\r\n\r\n```cpp\r\nC:\\Tests\\Cpp\\variant>clang++ -std=c++14 -Ivariant/include main.cc\r\nIn file included from main.cc:2:\r\nvariant/include\\mapbox/variant.hpp:599:44: error: no template named 'is_nothrow_default_constructible' in namespace\r\n      'std'; did you mean 'has_nothrow_default_constructor'?\r\n    VARIANT_INLINE variant() noexcept(std::is_nothrow_default_constructible<first_type>::value)\r\n                                      ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n                                           has_nothrow_default_constructor\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include\\type_traits:1021:12: note:\r\n      'has_nothrow_default_constructor' declared here\r\nusing tr1::has_nothrow_default_constructor;\r\n           ^\r\nIn file included from main.cc:2:\r\nvariant/include\\mapbox/variant.hpp:612:51: error: no template named 'is_nothrow_constructible' in namespace 'std'; did\r\n      you mean 'has_nothrow_constructor'?\r\n    VARIANT_INLINE variant(T&& val) noexcept(std::is_nothrow_constructible<typename Traits::target_type, T&&>::value)\r\n                                             ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~\r\n                                                  has_nothrow_constructor\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include\\type_traits:1018:12: note: 'has_nothrow_constructor'\r\n      declared here\r\nusing tr1::has_nothrow_constructor;     // retained\r\n           ^\r\nIn file included from main.cc:2:\r\nvariant/include\\mapbox/variant.hpp:612:51: error: too many template arguments for class template\r\n      'has_nothrow_constructor'\r\n    VARIANT_INLINE variant(T&& val) noexcept(std::is_nothrow_constructible<typename Traits::target_type, T&&>::value)\r\n                                                  ^                                                      ~~~~\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include\\type_traits:720:9: note: template is declared here\r\n        struct has_nothrow_constructor _HAS_NOTHROW_CONSTRUCTOR(_Ty)\r\n               ^\r\nIn file included from main.cc:2:\r\nvariant/include\\mapbox/variant.hpp:625:43: error: no template named 'is_nothrow_move_constructible' in namespace 'std';\r\n      did you mean 'has_nothrow_copy_constructor'?\r\n        noexcept(detail::conjunction<std::is_nothrow_move_constructible<Types>...>::value)\r\n                                     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n                                          has_nothrow_copy_constructor\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include\\type_traits:1020:12: note:\r\n      'has_nothrow_copy_constructor' declared here\r\nusing tr1::has_nothrow_copy_constructor;\r\n           ^\r\nIn file included from main.cc:2:\r\nvariant/include\\mapbox/variant.hpp:583:19: error: static_assert expression is not an integral constant expression\r\n    static_assert(sizeof...(Types) < std::numeric_limits<type_index_t>::max(), \"Internal index type must be abl...\r\n                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\nmain.cc:8:9: note: in instantiation of template class 'mapbox::util::variant<int, double>' requested here\r\n  myvar m;\r\n        ^\r\nvariant/include\\mapbox/variant.hpp:583:38: note: non-constexpr function 'max' cannot be used in a constant expression\r\n    static_assert(sizeof...(Types) < std::numeric_limits<type_index_t>::max(), \"Internal index type must be abl...\r\n                                     ^\r\nC:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\include\\limits:777:24: note: declared here\r\n        static _Ty (__CRTDECL max)() _THROW0()\r\n                              ^\r\n5 errors generated.\r\n```\r\n\r\nDon't know if I'm doing something wrong...\r\n"}}
{"actor":{"display_login":"usernameiwantedwasalreadytaken"}}