diff options
author | Wushin <pasekei@gmail.com> | 2015-06-19 21:52:58 -0500 |
---|---|---|
committer | Wushin <pasekei@gmail.com> | 2015-06-19 21:52:58 -0500 |
commit | 079e8815d62e052d654c4263f75cf7007f1cd4c3 (patch) | |
tree | 62597b8dada337e1e86ed16e35cf2241fa0732fc /src/ints/wrap.hpp | |
parent | 9d3e5757b1598028be49d4565712002593ae77ed (diff) | |
parent | 097e924102d7f9de5fed7c7bc537e378b72a6340 (diff) | |
download | tmwa-079e8815d62e052d654c4263f75cf7007f1cd4c3.tar.gz tmwa-079e8815d62e052d654c4263f75cf7007f1cd4c3.tar.bz2 tmwa-079e8815d62e052d654c4263f75cf7007f1cd4c3.tar.xz tmwa-079e8815d62e052d654c4263f75cf7007f1cd4c3.zip |
Merge pull request #73 from wushin/travis-update
Update Travis for gcc 5
Diffstat (limited to 'src/ints/wrap.hpp')
-rw-r--r-- | src/ints/wrap.hpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ints/wrap.hpp b/src/ints/wrap.hpp index 707c787..25b03c1 100644 --- a/src/ints/wrap.hpp +++ b/src/ints/wrap.hpp @@ -64,6 +64,14 @@ namespace ints } template<class T> + struct Sub : T + { + constexpr + Sub(typename T::wrapped_type v2) + : T(v2) + {} + }; + template<class T> constexpr typename T::wrapped_type unwrap(typename std::enable_if<true, T>::type w) { @@ -73,14 +81,7 @@ namespace ints constexpr T wrap(typename T::wrapped_type v) { - struct Sub : T - { - constexpr - Sub(typename T::wrapped_type v2) - : T(v2) - {} - }; - return Sub(v); + return Sub<T>(v); } template<class W> |