diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-11 23:00:40 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2016-01-11 23:00:40 +0000 |
commit | 79a4c20a95e174c1ceeb874b9b2776b34b5be6dc (patch) | |
tree | 348336e1a30a14e9b68412906b44a4c8d3d8e3f6 | |
parent | Rename add functions to avoid ambigious call errors all over the place (diff) | |
download | libadhocutil-79a4c20a95e174c1ceeb874b9b2776b34b5be6dc.tar.bz2 libadhocutil-79a4c20a95e174c1ceeb874b9b2776b34b5be6dc.tar.xz libadhocutil-79a4c20a95e174c1ceeb874b9b2776b34b5be6dc.zip |
Add a wrapper constructor to Exception to pass parameters to BaseException's constructor
-rw-r--r-- | libadhocutil/exception.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libadhocutil/exception.h b/libadhocutil/exception.h index fd4263c..57ce7c3 100644 --- a/libadhocutil/exception.h +++ b/libadhocutil/exception.h @@ -10,6 +10,11 @@ namespace AdHoc { template <typename BaseException> class Exception : public BaseException { public: + /// Wrapper constructor to pass to BaseException + //@param t parameters to pass. + template <typename ... T> + Exception(const T & ... t) : BaseException(t...) { } + /// Override of std::exception::what() to create text as required. inline const char * what() const throw() override { |