{"action":"closed","issue":{"url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/421","labels_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/421/comments","events_url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/issues/421/events","html_url":"https://github.com/isocpp/CppCoreGuidelines/issues/421","id":119812116,"number":421,"title":"F.6, noexcept, and memory allocation","user":{"login":"tituswinters","id":12462303,"avatar_url":"https://avatars.githubusercontent.com/u/12462303?v=3","gravatar_id":"","url":"https://api.github.com/users/tituswinters","html_url":"https://github.com/tituswinters","followers_url":"https://api.github.com/users/tituswinters/followers","following_url":"https://api.github.com/users/tituswinters/following{/other_user}","gists_url":"https://api.github.com/users/tituswinters/gists{/gist_id}","starred_url":"https://api.github.com/users/tituswinters/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tituswinters/subscriptions","organizations_url":"https://api.github.com/users/tituswinters/orgs","repos_url":"https://api.github.com/users/tituswinters/repos","events_url":"https://api.github.com/users/tituswinters/events{/privacy}","received_events_url":"https://api.github.com/users/tituswinters/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/isocpp/CppCoreGuidelines/labels/review","name":"review","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":{"login":"BjarneStroustrup","id":10933044,"avatar_url":"https://avatars.githubusercontent.com/u/10933044?v=3","gravatar_id":"","url":"https://api.github.com/users/BjarneStroustrup","html_url":"https://github.com/BjarneStroustrup","followers_url":"https://api.github.com/users/BjarneStroustrup/followers","following_url":"https://api.github.com/users/BjarneStroustrup/following{/other_user}","gists_url":"https://api.github.com/users/BjarneStroustrup/gists{/gist_id}","starred_url":"https://api.github.com/users/BjarneStroustrup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BjarneStroustrup/subscriptions","organizations_url":"https://api.github.com/users/BjarneStroustrup/orgs","repos_url":"https://api.github.com/users/BjarneStroustrup/repos","events_url":"https://api.github.com/users/BjarneStroustrup/events{/privacy}","received_events_url":"https://api.github.com/users/BjarneStroustrup/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-12-01T21:29:24Z","updated_at":"2015-12-23T00:44:13Z","closed_at":"2015-12-23T00:44:13Z","body":"Preamble:\r\nThe *standard* is clearly required to adhere to the issue of \"a call to new may throw\" and behave accordingly.  However, the set of environments where an allocation failure can be reasonably dealt with is small. Over the years I've collected only two examples:\r\n* When the system has pre-allocated memory sufficient to do emergency-state dump and can invoke that panic method\r\n* In a program like Photoshop where the size of the memory allocation is governed by user-input (allocating a new document of far-too-large a dimension)\r\n\r\nIn basically any other case, letting the system die because of the allocation failure is likely to be the best option.  \r\n\r\nSuggestion:\r\nClarify whether the core guidelines are focused on environments where failure-to-allocate exceptions can be reasonably dealt with.  If not, revisit the text in the note for F.6:\r\n\"In most programs, most functions can throw (e.g., because they use new, call functions that do, or use library functions that reports failure by throwing), so don't just sprinkle noexcept all over the place. noexcept is most useful for frequently used, low-level functions.\"\r\n"}}