make with_exception() const work in all cases
authorMarc Horowitz <mhorowitz@fb.com>
Thu, 11 Sep 2014 00:39:19 +0000 (17:39 -0700)
committerDave Watson <davejwatson@fb.com>
Wed, 17 Sep 2014 18:23:45 +0000 (11:23 -0700)
commit9d4d4b000cc218ee0c9c430257222dd63ad766ff
tree8c724621d017f6b7e49000d707f9b08aeb5d7353
parent28f7ed4fd1e1939bb8dfcf5bf139d8edb0594345
make with_exception() const work in all cases

Summary:
Abstract the with_exception() logic into a static template
function which will work with a const or non-const object.

Test Plan: exception_wrapper_test

Reviewed By: vloh@fb.com

Subscribers: njormrod

FB internal diff: D1549175

Tasks: 5127267
folly/ExceptionWrapper.h
folly/test/ExceptionWrapperTest.cpp