summaryrefslogtreecommitdiff
path: root/src/ints
diff options
context:
space:
mode:
authorwushin <pasekei@gmail.com>2015-04-27 17:16:03 -0500
committerwushin <pasekei@gmail.com>2015-05-24 11:55:40 -0500
commitccf575556a5d167f128a7ff8e817af7f9f3630ed (patch)
tree3365ea2085334d716d8295ac364dc360f077d773 /src/ints
parent26aa958d27385eb026d839098974b355957d9b61 (diff)
downloadtmwa-ccf575556a5d167f128a7ff8e817af7f9f3630ed.tar.gz
tmwa-ccf575556a5d167f128a7ff8e817af7f9f3630ed.tar.bz2
tmwa-ccf575556a5d167f128a7ff8e817af7f9f3630ed.tar.xz
tmwa-ccf575556a5d167f128a7ff8e817af7f9f3630ed.zip
Fix T Sub in a return-statement
Diffstat (limited to 'src/ints')
-rw-r--r--src/ints/wrap.hpp17
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>