You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2012/10/13 01:20:49 UTC
svn commit: r1397740 - in
/incubator/mesos/trunk/third_party/libprocess/include/stout: hashmap.hpp
hashset.hpp
Author: benh
Date: Fri Oct 12 23:20:48 2012
New Revision: 1397740
URL: http://svn.apache.org/viewvc?rev=1397740&view=rev
Log:
Added explicit default constructor to hashset/hashmap.
Modified:
incubator/mesos/trunk/third_party/libprocess/include/stout/hashmap.hpp
incubator/mesos/trunk/third_party/libprocess/include/stout/hashset.hpp
Modified: incubator/mesos/trunk/third_party/libprocess/include/stout/hashmap.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/include/stout/hashmap.hpp?rev=1397740&r1=1397739&r2=1397740&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/include/stout/hashmap.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/include/stout/hashmap.hpp Fri Oct 12 23:20:48 2012
@@ -19,6 +19,10 @@ template <typename Key, typename Value>
class hashmap : public boost::unordered_map<Key, Value>
{
public:
+ // An explicit default constructor is needed so
+ // 'const hashmap<T> map;' is not an error.
+ hashmap() {}
+
// Checks whether this map contains a binding for a key.
bool contains(const Key& key) const
{
Modified: incubator/mesos/trunk/third_party/libprocess/include/stout/hashset.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/third_party/libprocess/include/stout/hashset.hpp?rev=1397740&r1=1397739&r2=1397740&view=diff
==============================================================================
--- incubator/mesos/trunk/third_party/libprocess/include/stout/hashset.hpp (original)
+++ incubator/mesos/trunk/third_party/libprocess/include/stout/hashset.hpp Fri Oct 12 23:20:48 2012
@@ -17,6 +17,10 @@ template <typename Elem>
class hashset : public boost::unordered_set<Elem>
{
public:
+ // An explicit default constructor is needed so
+ // 'const hashset<T> map;' is not an error.
+ hashset() {}
+
// Checks whether this map contains a binding for a key.
bool contains(const Elem& elem) const
{