{"action":"created","issue":{"url":"https://api.github.com/repos/jcupitt/libvips/issues/362","labels_url":"https://api.github.com/repos/jcupitt/libvips/issues/362/labels{/name}","comments_url":"https://api.github.com/repos/jcupitt/libvips/issues/362/comments","events_url":"https://api.github.com/repos/jcupitt/libvips/issues/362/events","html_url":"https://github.com/jcupitt/libvips/issues/362","id":125761542,"number":362,"title":"Question: are exception specifications required in vips8 C++ bindings?","user":{"login":"lovell","id":210965,"avatar_url":"https://avatars.githubusercontent.com/u/210965?v=3","gravatar_id":"","url":"https://api.github.com/users/lovell","html_url":"https://github.com/lovell","followers_url":"https://api.github.com/users/lovell/followers","following_url":"https://api.github.com/users/lovell/following{/other_user}","gists_url":"https://api.github.com/users/lovell/gists{/gist_id}","starred_url":"https://api.github.com/users/lovell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lovell/subscriptions","organizations_url":"https://api.github.com/users/lovell/orgs","repos_url":"https://api.github.com/users/lovell/repos","events_url":"https://api.github.com/users/lovell/events{/privacy}","received_events_url":"https://api.github.com/users/lovell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jcupitt/libvips/labels/enhancement","name":"enhancement","color":"0b02e1"},{"url":"https://api.github.com/repos/jcupitt/libvips/labels/in%20development","name":"in development","color":"eb6420"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-01-09T14:29:35Z","updated_at":"2016-01-10T12:03:57Z","closed_at":"2016-01-09T21:35:20Z","body":"Hi John, I'm starting to convert sharp to use the new vips8 C++ bindings - see https://github.com/lovell/sharp/issues/299\r\n\r\nI notice from the hundreds of MSVC compiler warnings that many of the functions explicitly throw `VError`, e.g. https://github.com/jcupitt/libvips/blob/master/cplusplus/include/vips/VImage8.h#L368\r\n\r\nThe use of exception specifications is deprecated in C++11 and compilers like MSVC have never bothered to implement them with any version of C++.\r\n\r\nI could silence these warnings but it might be better to remove the use of exception specifications completely. The arguments at http://www.gotw.ca/publications/mill22.htm are rather compelling and the runtime performance hit is something I hadn't previously considered.\r\n\r\nI'm happy to make this change and submit a PR but only with your blessing!"},"comment":{"url":"https://api.github.com/repos/jcupitt/libvips/issues/comments/170339635","html_url":"https://github.com/jcupitt/libvips/issues/362#issuecomment-170339635","issue_url":"https://api.github.com/repos/jcupitt/libvips/issues/362","id":170339635,"user":{"login":"lovell","id":210965,"avatar_url":"https://avatars.githubusercontent.com/u/210965?v=3","gravatar_id":"","url":"https://api.github.com/users/lovell","html_url":"https://github.com/lovell","followers_url":"https://api.github.com/users/lovell/followers","following_url":"https://api.github.com/users/lovell/following{/other_user}","gists_url":"https://api.github.com/users/lovell/gists{/gist_id}","starred_url":"https://api.github.com/users/lovell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lovell/subscriptions","organizations_url":"https://api.github.com/users/lovell/orgs","repos_url":"https://api.github.com/users/lovell/repos","events_url":"https://api.github.com/users/lovell/events{/privacy}","received_events_url":"https://api.github.com/users/lovell/received_events","type":"User","site_admin":false},"created_at":"2016-01-10T12:03:57Z","updated_at":"2016-01-10T12:03:57Z","body":"There are a couple of remaining exception specifications in VError https://github.com/jcupitt/libvips/blob/master/cplusplus/include/vips/VError8.h#L48-L51\r\n\r\nThe only thing that might prevent a :+1: is a possibly-related `free(): invalid pointer` segfault that I can only reproduce on ArchLinux.\r\n\r\n```\r\n/usr/lib/libc.so.6(+0x72055)[0x7fbc7f810055]\r\n/usr/lib/libc.so.6(+0x779a6)[0x7fbc7f8159a6]\r\n/usr/lib/libc.so.6(+0x7818e)[0x7fbc7f81618e]\r\n/v/build/Release/sharp.node(_ZN4vips6VErrorD2Ev+0x2c)[0x7fbc7998229c]\r\n/usr/lib/libstdc++.so.6(+0x8db0f)[0x7fbc800e3b0f]\r\n/v/build/Release/sharp.node(_ZN14PipelineWorker7ExecuteEv+0x54b1)[0x7fbc79992231]\r\n/usr/lib/libuv.so.1(+0x7ebf)[0x7fbc8190debf]\r\n```\r\n\r\n`_ZN4vips6VErrorD2Ev+0x2c` demangles as the VError destructor `vips::VError::~VError()`. Investigation continues..."}}