From 3a9422d1146085dcdef823dcbf703e7c59f4bf2a Mon Sep 17 00:00:00 2001 From: Omry Yadan Date: Wed, 19 Feb 2014 17:33:43 -0800 Subject: [PATCH] allow folly Cursor to read and write floats Summary: and doubles! Test Plan: none really, will test later for now it compiles Reviewed By: tudorb@fb.com FB internal diff: D1175021 --- folly/io/Cursor.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/folly/io/Cursor.h b/folly/io/Cursor.h index bb0e5fdd..764f52a1 100644 --- a/folly/io/Cursor.h +++ b/folly/io/Cursor.h @@ -86,7 +86,7 @@ class CursorBase { } template - typename std::enable_if::value, T>::type + typename std::enable_if::value, T>::type read() { T val; pull(&val, sizeof(T)); @@ -409,7 +409,7 @@ template class Writable { public: template - typename std::enable_if::value>::type + typename std::enable_if::value>::type write(T value) { const uint8_t* u8 = reinterpret_cast(&value); Derived* d = static_cast(this); @@ -685,7 +685,7 @@ class QueueAppender : public detail::Writable { void ensure(uint64_t n) { queue_->preallocate(n, growth_); } template - typename std::enable_if::value>::type + typename std::enable_if::value>::type write(T value) { // We can't fail. auto p = queue_->preallocate(sizeof(T), growth_); -- 2.34.1