From 5192ea4977c03e27906703352b10fad4c8fb6b97 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 24 Jan 2016 16:59:44 +0000 Subject: [PATCH] small cleanup --- ostd/atomic.hh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/ostd/atomic.hh b/ostd/atomic.hh index 2169961..e6cdff7 100644 --- a/ostd/atomic.hh +++ b/ostd/atomic.hh @@ -41,22 +41,20 @@ namespace detail { int test_atomic_assignable(...); template - struct CanAtomicAssign { - static constexpr bool value - = (sizeof(test_atomic_assignable(1)) == sizeof(char)); - }; + constexpr bool CanAtomicAssign + = (sizeof(test_atomic_assignable(1)) == sizeof(char)); template static inline EnableIf< - CanAtomicAssign *, T>::value + CanAtomicAssign *, T> > atomic_init(volatile AtomicBase *a, T v) { a->p_value = v; } template static inline EnableIf< - !CanAtomicAssign *, T>::value && - CanAtomicAssign< AtomicBase *, T>::value + !CanAtomicAssign *, T> && + CanAtomicAssign< AtomicBase *, T> > atomic_init(volatile AtomicBase *a, T v) { volatile char *to = (volatile char *)(&a->p_value); volatile char *end = to + sizeof(T);