24 #include <type_traits> 30 ostream& operator<<(typename enable_if<is_enum<T>::value, ostream>::type& stream,
const T& e)
32 return stream << static_cast<typename underlying_type<T>::type>(e);
36 namespace vgi {
namespace dbconn {
namespace utils {
39 constexpr
typename std::underlying_type<T>::type base_type(T t) {
return typename std::underlying_type<T>::type(t); }
46 while(lck.test_and_set(std::memory_order_acquire))
52 lck.clear(std::memory_order_release);
56 std::atomic_flag lck = ATOMIC_FLAG_INIT;
61 #endif // UTILITIES_HPP