diff --git a/src/encoding/block.cpp b/src/encoding/block.cpp
index 639ed68..1aa9756 100644
--- a/src/encoding/block.cpp
+++ b/src/encoding/block.cpp
@@ -34,20 +34,17 @@
 namespace ndn {
 
 BOOST_CONCEPT_ASSERT((boost::EqualityComparable<Block>));
-static_assert(std::is_nothrow_move_constructible<Block>::value,
-              "Block must be MoveConstructible with noexcept");
-static_assert(std::is_nothrow_move_assignable<Block>::value,
-              "Block must be MoveAssignable with noexcept");
 
 const size_t MAX_SIZE_OF_BLOCK_FROM_STREAM = MAX_NDN_PACKET_SIZE;
 
 // ---- constructor, creation, assignment ----
 
-Block::Block()
-  : m_type(std::numeric_limits<uint32_t>::max())
-  , m_size(0)
-{
-}
+Block::Block() = default;
+
+Block::Block(const Block&) = default;
+
+Block&
+Block::operator=(const Block&) = default;
 
 Block::Block(const EncodingBuffer& buffer)
   : Block(buffer.getBuffer(), buffer.begin(), buffer.end(), true)
@@ -116,10 +113,13 @@
   uint64_t length = tlv::readVarNumber(pos, end);
   // pos now points to TLV-VALUE
 
+  BOOST_ASSERT(pos <= end);
   if (length > static_cast<uint64_t>(end - pos)) {
     BOOST_THROW_EXCEPTION(Error("Not enough bytes in the buffer to fully parse TLV"));
   }
-  size_t typeLengthSize = pos - buf;
+
+  BOOST_ASSERT(pos > buf);
+  uint64_t typeLengthSize = static_cast<uint64_t>(pos - buf);
   m_size = typeLengthSize + length;
 
   m_buffer = make_shared<Buffer>(buf, m_size);
@@ -262,7 +262,7 @@
 Block::resetWire()
 {
   m_buffer.reset(); // discard underlying buffer by resetting shared_ptr
-  m_begin = m_end = m_valueBegin = m_valueEnd = Buffer::const_iterator();
+  m_begin = m_end = m_valueBegin = m_valueEnd = {};
 }
 
 Buffer::const_iterator
@@ -313,7 +313,7 @@
 size_t
 Block::value_size() const
 {
-  return hasValue() ? m_valueEnd - m_valueBegin : 0;
+  return hasValue() ? static_cast<size_t>(m_valueEnd - m_valueBegin) : 0;
 }
 
 Block
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index 63f3677..2aec91c 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -61,6 +61,24 @@
    */
   Block();
 
+  /** @brief Copy constructor
+   */
+  Block(const Block&);
+
+  /** @brief Copy assignment operator
+   */
+  Block&
+  operator=(const Block&);
+
+  /** @brief Move constructor
+   */
+  Block(Block&&) noexcept;
+
+  /** @brief Move assignment operator
+   */
+  Block&
+  operator=(Block&&) noexcept;
+
   /** @brief Parse Block from an EncodingBuffer
    *  @param buffer an EncodingBuffer containing one TLV element
    *  @throw tlv::Error Type-Length parsing fails, or TLV-LENGTH does not match size of TLV-VALUE
@@ -412,13 +430,13 @@
   Buffer::const_iterator m_valueBegin; ///< @sa m_buffer
   Buffer::const_iterator m_valueEnd; ///< @sa m_buffer
 
-  uint32_t m_type; ///< TLV-TYPE
+  uint32_t m_type = std::numeric_limits<uint32_t>::max(); ///< TLV-TYPE
 
   /** @brief total size including Type-Length-Value
    *
    *  This field is valid only if empty() is false.
    */
-  uint32_t m_size;
+  size_t m_size = 0;
 
   /** @brief sub elements
    *
@@ -439,6 +457,12 @@
   operator<<(std::ostream& os, const Block& block);
 };
 
+inline
+Block::Block(Block&&) noexcept = default;
+
+inline Block&
+Block::operator=(Block&&) noexcept = default;
+
 /** @brief Compare whether two Blocks have same TLV-TYPE, TLV-LENGTH, and TLV-VALUE
  */
 bool
diff --git a/src/encoding/buffer.cpp b/src/encoding/buffer.cpp
deleted file mode 100644
index 531e9fa..0000000
--- a/src/encoding/buffer.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/*
- * Copyright (c) 2013-2018 Regents of the University of California.
- *
- * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
- *
- * ndn-cxx library is free software: you can redistribute it and/or modify it under the
- * terms of the GNU Lesser General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later version.
- *
- * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
- *
- * You should have received copies of the GNU General Public License and GNU Lesser
- * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
- * <http://www.gnu.org/licenses/>.
- *
- * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
- *
- * @author Alexander Afanasyev <http://lasr.cs.ucla.edu/afanasyev/index.html>
- */
-
-#include "buffer.hpp"
-
-namespace ndn {
-
-static_assert(std::is_nothrow_move_constructible<Buffer>::value,
-              "Buffer must be MoveConstructible with noexcept");
-static_assert(std::is_nothrow_move_assignable<Buffer>::value,
-              "Buffer must be MoveAssignable with noexcept");
-
-Buffer::Buffer() = default;
-
-Buffer::Buffer(size_t size)
-  : std::vector<uint8_t>(size, 0)
-{
-}
-
-Buffer::Buffer(const void* buf, size_t length)
-  : std::vector<uint8_t>(reinterpret_cast<const uint8_t*>(buf),
-                         reinterpret_cast<const uint8_t*>(buf) + length)
-{
-}
-
-} // namespace ndn
diff --git a/src/encoding/buffer.hpp b/src/encoding/buffer.hpp
index fbfeb00..d695f1c 100644
--- a/src/encoding/buffer.hpp
+++ b/src/encoding/buffer.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2017 Regents of the University of California.
+ * Copyright (c) 2013-2018 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -42,19 +42,44 @@
 public:
   /** @brief Creates an empty Buffer
    */
-  Buffer();
+  Buffer() = default;
+
+  /** @brief Copy constructor
+   */
+  Buffer(const Buffer&);
+
+  /** @brief Copy assignment operator
+   */
+  Buffer&
+  operator=(const Buffer&);
+
+  /** @brief Move constructor
+   */
+  Buffer(Buffer&&) noexcept;
+
+  /** @brief Move assignment operator
+   */
+  Buffer&
+  operator=(Buffer&&) noexcept;
 
   /** @brief Creates a Buffer with pre-allocated size
    *  @param size size of the Buffer to be allocated
    */
   explicit
-  Buffer(size_t size);
+  Buffer(size_t size)
+    : std::vector<uint8_t>(size, 0)
+  {
+  }
 
   /** @brief Creates a Buffer by copying contents from a raw buffer
    *  @param buf const pointer to buffer to copy
    *  @param length length of the buffer to copy
    */
-  Buffer(const void* buf, size_t length);
+  Buffer(const void* buf, size_t length)
+    : std::vector<uint8_t>(reinterpret_cast<const uint8_t*>(buf),
+                           reinterpret_cast<const uint8_t*>(buf) + length)
+  {
+  }
 
   /** @brief Creates a Buffer by copying the elements of the range [first, last)
    *  @param first an input iterator to the first element to copy
@@ -85,6 +110,18 @@
   }
 };
 
+inline
+Buffer::Buffer(const Buffer&) = default;
+
+inline Buffer&
+Buffer::operator=(const Buffer&) = default;
+
+inline
+Buffer::Buffer(Buffer&&) noexcept = default;
+
+inline Buffer&
+Buffer::operator=(Buffer&&) noexcept = default;
+
 using BufferPtr = shared_ptr<Buffer>;
 using ConstBufferPtr = shared_ptr<const Buffer>;
 
