T interlocked_compare_exchange(T* target,T new_value,T comparand) { NDNBOOST_STATIC_ASSERT(sizeof(T)==sizeof(long)); long const res=NDNBOOST_INTERLOCKED_COMPARE_EXCHANGE(reinterpret_cast<long*>(target), *reinterpret_cast<long*>(&new_value), *reinterpret_cast<long*>(&comparand)); return *reinterpret_cast<T const*>(&res); }
std::streamsize write(const char_type* s, std::streamsize n) { NDNBOOST_STATIC_ASSERT(( is_convertible< NDNBOOST_DEDUCED_TYPENAME iostreams::category_of<Device>::type, output >::value )); std::streamsize result1 = iostreams::write(dev_, s, n); std::streamsize result2 = iostreams::write(sink_, s, n); (void) result1; // Suppress 'unused variable' warning. (void) result2; NDNBOOST_ASSERT(result1 == n && result2 == n); return n; }
std::streamsize read(char_type* s, std::streamsize n) { NDNBOOST_STATIC_ASSERT(( is_convertible< NDNBOOST_DEDUCED_TYPENAME iostreams::category_of<Device>::type, input >::value )); std::streamsize result1 = iostreams::read(dev_, s, n); if (result1 != -1) { std::streamsize result2 = iostreams::write(sink_, s, result1); (void) result1; // Suppress 'unused variable' warning. (void) result2; NDNBOOST_ASSERT(result1 == result2); } return result1; }
inline void iterator_adaptor_assert_traversal () { NDNBOOST_STATIC_ASSERT((is_convertible<Tr1, Tr2>::value)); }