Repository: geode-native Updated Branches: refs/heads/develop 8d1a30049 -> 420a67dae
GEODE-2741: Fixes Solaris compilation. - Removes template parameter packing. - Updates default set of linker libraries. Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/420a67da Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/420a67da Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/420a67da Branch: refs/heads/develop Commit: 420a67daec6890f32a0bcf237da19b63bc9d2fb0 Parents: 8d1a300 Author: Jacob Barrett <[email protected]> Authored: Sat Jun 10 07:40:41 2017 +0000 Committer: Jacob Barrett <[email protected]> Committed: Sat Jun 10 17:13:02 2017 +0000 ---------------------------------------------------------------------- src/CMakeLists.txt | 2 +- src/cppcache/include/geode/Serializer.hpp | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/geode-native/blob/420a67da/src/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 8178ebf..d3e2ee1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -170,7 +170,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") # TODO cmake find a better way to set runtime libraries # C++11 requires these libraries, treat -std=c++11 as library #TODO look into CMAKE_CXX_STANDARD_LIBRARIES - target_link_libraries(c++11 INTERFACE -std=c++11 stdc++ gcc_s CrunG3 c) + target_link_libraries(c++11 INTERFACE -std=c++11 stdc++ gcc_s CrunG3 m c) elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs") endif() http://git-wip-us.apache.org/repos/asf/geode-native/blob/420a67da/src/cppcache/include/geode/Serializer.hpp ---------------------------------------------------------------------- diff --git a/src/cppcache/include/geode/Serializer.hpp b/src/cppcache/include/geode/Serializer.hpp index c0f7eab..0efa1b1 100644 --- a/src/cppcache/include/geode/Serializer.hpp +++ b/src/cppcache/include/geode/Serializer.hpp @@ -315,9 +315,9 @@ inline uint32_t objectSize(const TObj* array, TLen len) { // For containers vector/hashmap/hashset -template <typename TObj, typename... _tail> +template <typename TObj, typename Allocator> inline void writeObject(apache::geode::client::DataOutput& output, - const std::vector<TObj, _tail...>& value) { + const std::vector<TObj, Allocator>& value) { output.writeArrayLen(static_cast<int32_t>(value.size())); for (const auto& v : value) { writeObject(output, v); @@ -335,9 +335,9 @@ inline uint32_t objectSize(const VectorOfCacheable& value) { return static_cast<uint32_t>(objectSize); } -template <typename TObj, typename... _tail> +template <typename TObj, typename _tail> inline void readObject(apache::geode::client::DataInput& input, - std::vector<TObj, _tail...>& value) { + std::vector<TObj, _tail>& value) { int32_t len; input.readArrayLen(&len); if (len >= 0) { @@ -349,10 +349,10 @@ inline void readObject(apache::geode::client::DataInput& input, } } -template <typename TKey, typename TValue, typename... _tail> +template <typename TKey, typename TValue, typename Hash, typename KeyEqual, typename Allocator> inline void writeObject( apache::geode::client::DataOutput& output, - const std::unordered_map<TKey, TValue, _tail...>& value) { + const std::unordered_map<TKey, TValue, Hash, KeyEqual, Allocator>& value) { output.writeArrayLen(static_cast<int32_t>(value.size())); for (const auto& iter : value) { writeObject(output, iter.first); @@ -373,9 +373,9 @@ inline uint32_t objectSize(const HashMapOfCacheable& value) { return objectSize; } -template <typename TKey, typename TValue, typename... _tail> +template <typename TKey, typename TValue, typename Hash, typename KeyEqual, typename Allocator> inline void readObject(apache::geode::client::DataInput& input, - std::unordered_map<TKey, TValue, _tail...>& value) { + std::unordered_map<TKey, TValue, Hash, KeyEqual, Allocator>& value) { int32_t len; input.readArrayLen(&len); value.reserve(len); @@ -388,9 +388,9 @@ inline void readObject(apache::geode::client::DataInput& input, } } -template <typename TKey, typename... _tail> +template <typename TKey, typename Hash, typename KeyEqual, typename Allocator> inline void writeObject(apache::geode::client::DataOutput& output, - const std::unordered_set<TKey, _tail...>& value) { + const std::unordered_set<TKey, Hash, KeyEqual, Allocator>& value) { output.writeArrayLen(static_cast<int32_t>(value.size())); for (const auto& iter : value) { writeObject(output, iter); @@ -408,9 +408,9 @@ inline uint32_t objectSize(const HashSetOfCacheableKey& value) { return objectSize; } -template <typename TKey, typename... _tail> +template <typename TKey, typename Hash, typename KeyEqual, typename Allocator> inline void readObject(apache::geode::client::DataInput& input, - std::unordered_set<TKey, _tail...>& value) { + std::unordered_set<TKey, Hash, KeyEqual, Allocator>& value) { int32_t len; input.readArrayLen(&len); if (len > 0) {
