util: backport C++17 [[nodiscard]] attribute

Change-Id: I6bdeeaed09a4a5d36647ec967aead47e4461e583
diff --git a/ndn-cxx/name.hpp b/ndn-cxx/name.hpp
index 27859fb..18b1fc3 100644
--- a/ndn-cxx/name.hpp
+++ b/ndn-cxx/name.hpp
@@ -135,7 +135,7 @@
 public: // access
   /** @brief Checks if the name is empty, i.e. has no components.
    */
-  bool
+  NDN_CXX_NODISCARD bool
   empty() const
   {
     return m_wire.elements().empty();