In common.h, define func_lib for function objects.  In configure.ac, define HAVE_STD_FUNCTION and HAVE_BOOST_FUNCTION.  Include function headers in ndnboost.
diff --git a/libs/functional/hash/examples/Jamfile.v2 b/libs/functional/hash/examples/Jamfile.v2
new file mode 100644
index 0000000..6291621
--- /dev/null
+++ b/libs/functional/hash/examples/Jamfile.v2
@@ -0,0 +1,9 @@
+
+# Copyright Daniel James 2005. Use, modification, and distribution are
+# subject to the Boost Software License, Version 1.0. (See accompanying
+# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+run books.cpp ;
+run point.cpp ;
+run portable.cpp ;
+run template.cpp ;
diff --git a/libs/functional/hash/examples/books.cpp b/libs/functional/hash/examples/books.cpp
new file mode 100644
index 0000000..8802e0e
--- /dev/null
+++ b/libs/functional/hash/examples/books.cpp
@@ -0,0 +1,51 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include "./books.hpp"
+#include <boost/functional/hash.hpp>
+#include <cassert>
+
+// If std::unordered_set was available:
+//#include <unordered_set>
+
+// This example illustrates how to use ndnboost::hash with a custom hash function.
+// For full details, see the tutorial.
+
+int main()
+{
+    library::book knife(3458, "Zane Grey", "The Hash Knife Outfit");
+    library::book dandelion(1354, "Paul J. Shanley", "Hash & Dandelion Greens");
+
+    ndnboost::hash<library::book> book_hasher;
+    std::size_t knife_hash_value = book_hasher(knife);
+    (void)knife_hash_value; // suppress unused variable warning
+
+    // If std::unordered_set was available:
+    //
+    //std::unordered_set<library::book, ndnboost::hash<library::book> > books;
+    //books.insert(knife);
+    //books.insert(library::book(2443, "Lindgren, Torgny", "Hash"));
+    //books.insert(library::book(1953, "Snyder, Bernadette M.",
+    //    "Heavenly Hash: A Tasty Mix of a Mother's Meditations"));
+
+    //assert(books.find(knife) != books.end());
+    //assert(books.find(dandelion) == books.end());
+
+    return 0;
+}
+
+namespace library
+{
+    bool operator==(book const& a, book const& b)
+    {
+        return a.id == b.id;
+    }
+
+    std::size_t hash_value(book const& b)
+    {
+        ndnboost::hash<int> hasher;
+        return hasher(b.id);
+    }
+}
diff --git a/libs/functional/hash/examples/books.hpp b/libs/functional/hash/examples/books.hpp
new file mode 100644
index 0000000..195a798
--- /dev/null
+++ b/libs/functional/hash/examples/books.hpp
@@ -0,0 +1,26 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// This example illustrates how to use ndnboost::hash with a custom hash function.
+// The implementation is contained in books.cpp
+
+#include <cstddef>
+#include <string>
+
+namespace library
+{
+    struct book
+    {
+        int id;
+        std::string author;
+        std::string title;
+
+        book(int i, std::string const& a, std::string const& t)
+            : id(i), author(a), title(t) {}
+    };
+
+    bool operator==(book const&, book const&);
+    std::size_t hash_value(book const&);
+}
diff --git a/libs/functional/hash/examples/point.cpp b/libs/functional/hash/examples/point.cpp
new file mode 100644
index 0000000..b36e3e2
--- /dev/null
+++ b/libs/functional/hash/examples/point.cpp
@@ -0,0 +1,54 @@
+
+// Copyright 2005 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/functional/hash.hpp>
+#include <cassert>
+
+// This example illustrates how to use ndnboost::hash_combine to generate a hash
+// value from the different members of a class. For full details see the hash
+// tutorial.
+
+class point
+{
+    int x;
+    int y;
+public:
+    point() : x(0), y(0) {}
+    point(int x, int y) : x(x), y(y) {}
+
+    bool operator==(point const& other) const
+    {
+        return x == other.x && y == other.y;
+    }
+
+    friend std::size_t hash_value(point const& p)
+    {
+        std::size_t seed = 0;
+        ndnboost::hash_combine(seed, p.x);
+        ndnboost::hash_combine(seed, p.y);
+
+        return seed;
+    }
+};
+
+int main()
+{
+    ndnboost::hash<point> point_hasher;
+
+    point p1(0, 0);
+    point p2(1, 2);
+    point p3(4, 1);
+    point p4 = p1;
+
+    assert(point_hasher(p1) == point_hasher(p4));
+
+    // These tests could legally fail, but if they did it'd be a pretty bad
+    // hash function.
+    assert(point_hasher(p1) != point_hasher(p2));
+    assert(point_hasher(p1) != point_hasher(p3));
+
+    return 0;
+}
+
diff --git a/libs/functional/hash/examples/portable.cpp b/libs/functional/hash/examples/portable.cpp
new file mode 100644
index 0000000..94b2e0e
--- /dev/null
+++ b/libs/functional/hash/examples/portable.cpp
@@ -0,0 +1,54 @@
+
+// Copyright 2005-2009 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/functional/hash.hpp>
+#include <cassert>
+
+// This example illustrates how to customise ndnboost::hash portably, so that
+// it'll work on both compilers that don't implement argument dependent lookup
+// and compilers that implement strict two-phase template instantiation.
+
+namespace foo
+{
+    template <class T>
+    class custom_type
+    {
+        T value;
+    public:
+        custom_type(T x) : value(x) {}
+
+        std::size_t hash() const
+        {
+            ndnboost::hash<T> hasher;
+            return hasher(value);
+        }
+    };
+}
+
+#ifdef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+namespace ndnboost
+#else
+namespace foo
+#endif
+{
+    template <class T>
+    std::size_t hash_value(foo::custom_type<T> x)
+    {
+        return x.hash();
+    }
+}
+
+int main()
+{
+    foo::custom_type<int> x(1), y(2), z(1);
+
+    ndnboost::hash<foo::custom_type<int> > hasher;
+
+    assert(hasher(x) == hasher(x));
+    assert(hasher(x) != hasher(y));
+    assert(hasher(x) == hasher(z));
+
+    return 0;
+}
diff --git a/libs/functional/hash/examples/template.cpp b/libs/functional/hash/examples/template.cpp
new file mode 100644
index 0000000..d58ef5c
--- /dev/null
+++ b/libs/functional/hash/examples/template.cpp
@@ -0,0 +1,18 @@
+
+// Copyright 2012 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include "template.hpp"
+#include <cassert>
+#include <boost/unordered_set.hpp>
+
+int main()
+{
+    typedef my_pair<int, float> pair;
+    ndnboost::unordered_set<pair> pair_set;
+    pair_set.emplace(10, 0.5f);
+
+    assert(pair_set.find(pair(10, 0.5f)) != pair_set.end());
+    assert(pair_set.find(pair(10, 0.6f)) == pair_set.end());
+}
diff --git a/libs/functional/hash/examples/template.hpp b/libs/functional/hash/examples/template.hpp
new file mode 100644
index 0000000..1817a9d
--- /dev/null
+++ b/libs/functional/hash/examples/template.hpp
@@ -0,0 +1,36 @@
+
+// Copyright 2012 Daniel James.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// This is an example of how to write a hash function for a template
+// class.
+
+#include <boost/functional/hash_fwd.hpp>
+
+template <typename A, typename B>
+class my_pair
+{
+    A value1;
+    B value2;
+public:
+    my_pair(A const& v1, B const& v2)
+        : value1(v1), value2(v2)
+    {}
+
+    bool operator==(my_pair const& other) const
+    {
+        return value1 == other.value1 &&
+            value2 == other.value2;
+    }
+
+    friend std::size_t hash_value(my_pair const& p)
+    {
+        std::size_t seed = 0;
+        ndnboost::hash_combine(seed, p.value1);
+        ndnboost::hash_combine(seed, p.value2);
+
+        return seed;
+    }
+};
+