{"action":"closed","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/3306","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/3306/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/3306/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/3306/events","html_url":"https://github.com/kripken/emscripten/issues/3306","id":66242294,"number":3306,"title":"\"warning: unresolved symbol\" when using std::experimental::optional<T>","user":{"login":"jplatte","id":951129,"avatar_url":"https://avatars.githubusercontent.com/u/951129?v=3","gravatar_id":"","url":"https://api.github.com/users/jplatte","html_url":"https://github.com/jplatte","followers_url":"https://api.github.com/users/jplatte/followers","following_url":"https://api.github.com/users/jplatte/following{/other_user}","gists_url":"https://api.github.com/users/jplatte/gists{/gist_id}","starred_url":"https://api.github.com/users/jplatte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jplatte/subscriptions","organizations_url":"https://api.github.com/users/jplatte/orgs","repos_url":"https://api.github.com/users/jplatte/repos","events_url":"https://api.github.com/users/jplatte/events{/privacy}","received_events_url":"https://api.github.com/users/jplatte/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-03T22:52:03Z","updated_at":"2015-08-13T00:43:52Z","closed_at":"2015-08-13T00:43:52Z","body":"... or, more specifially, `std::experimental::optional<T>::value()`. This happens as soon as I use this function on optional objects, without it everything is fine. The problem is that the `bad_optional_access` exception class implementation seems to miss a few bits. Here are the three lines of error messages I get:\r\n\r\n    warning: unresolved symbol: _ZNSt12experimental19bad_optional_accessD1Ev\r\n    warning: unresolved symbol: _ZTINSt12experimental19bad_optional_accessE\r\n    warning: unresolved symbol: _ZTVNSt12experimental19bad_optional_accessE\r\n\r\nThese are the unmangled symbol names:\r\n\r\n    std::experimental::bad_optional_access::~bad_optional_access()\r\n    typeinfo for std::experimental::bad_optional_access\r\n    vtable for std::experimental::bad_optional_access\r\n\r\nI'm using emcc / em++ 1.30.2 (clang 3.6.0). I tested building natively with both gcc / g++ 4.9.2 and clang / clang++ 3.6.0 and didn't have the same problem there (though this might have to do with which standard library implementation they are using, I don't know a lot about that)."}}