boost-serialization-1.64.0-fixes.patch 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. From a44c228e28d3d82137e9efe376b425013aa59f0a Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= <bpiotrowski@archlinux.org>
  3. Date: Tue, 16 May 2017 15:08:59 +0200
  4. Subject: [PATCH] Restore boost/serialization/detail/get_data.hpp
  5. This reverts commit d558b6da917ecae1036adf9b22a0741c78f627ff.
  6. ---
  7. include/boost/serialization/detail/get_data.hpp | 59 +++++++++++++++++++++++++
  8. 1 file changed, 59 insertions(+)
  9. create mode 100644 include/boost/serialization/detail/get_data.hpp
  10. diff --git a/include/boost/serialization/detail/get_data.hpp b/include/boost/serialization/detail/get_data.hpp
  11. new file mode 100644
  12. index 00000000..37da7fc3
  13. --- /dev/null
  14. +++ b/include/boost/serialization/detail/get_data.hpp
  15. @@ -0,0 +1,59 @@
  16. +// (C) Copyright 2005 Matthias Troyer
  17. +// Use, modification and distribution is subject to the Boost Software
  18. +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
  19. +// http://www.boost.org/LICENSE_1_0.txt)
  20. +
  21. +// See http://www.boost.org for updates, documentation, and revision history.
  22. +
  23. +#ifndef BOOST_SERIALIZATION_DETAIL_GET_DATA_HPP
  24. +#define BOOST_SERIALIZATION_DETAIL_GET_DATA_HPP
  25. +
  26. +// MS compatible compilers support #pragma once
  27. +#if defined(_MSC_VER)
  28. +# pragma once
  29. +#endif
  30. +
  31. +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
  32. +#define STD _STLP_STD
  33. +#else
  34. +#define STD std
  35. +#endif
  36. +
  37. +#include <vector>
  38. +#include <valarray>
  39. +
  40. +namespace boost {
  41. +namespace serialization {
  42. +namespace detail {
  43. +
  44. +template <class T, class Allocator>
  45. +T* get_data(STD::vector<T,Allocator>& v)
  46. +{
  47. + return v.empty() ? 0 : &(v[0]);
  48. +}
  49. +
  50. +template <class T, class Allocator>
  51. +T* get_data(STD::vector<T,Allocator> const & v)
  52. +{
  53. + return get_data(const_cast<STD::vector<T,Allocator>&>(v));
  54. +}
  55. +
  56. +template <class T>
  57. +T* get_data(STD::valarray<T>& v)
  58. +{
  59. + return v.size()==0 ? 0 : &(v[0]);
  60. +}
  61. +
  62. +template <class T>
  63. +const T* get_data(STD::valarray<T> const& v)
  64. +{
  65. + return get_data(const_cast<STD::valarray<T>&>(v));
  66. +}
  67. +
  68. +} // detail
  69. +} // serialization
  70. +} // boost
  71. +
  72. +#undef STD
  73. +
  74. +#endif // BOOST_SERIALIZATION_DETAIL_GET_DATA_HPP
  75. --
  76. 2.13.0
  77. From 1d86261581230e2dc5d617a9b16287d326f3e229 Mon Sep 17 00:00:00 2001
  78. From: Robert Ramey <ramey@rrsd.com>
  79. Date: Wed, 1 Feb 2017 16:43:59 -0800
  80. Subject: [PATCH] correct error which appeared when compiling non c++ compliant
  81. code for arrays
  82. ---
  83. include/boost/serialization/array.hpp | 2 ++
  84. 1 file changed, 2 insertions(+)
  85. diff --git a/include/boost/serialization/array.hpp b/include/boost/serialization/array.hpp
  86. index 61708b3..612d1a6 100644
  87. --- a/include/boost/serialization/array.hpp
  88. +++ b/include/boost/serialization/array.hpp
  89. @@ -23,6 +23,8 @@ namespace std{
  90. } // namespace std
  91. #endif
  92. +#include <boost/serialization/array_wrapper.hpp>
  93. +
  94. #ifndef BOOST_NO_CXX11_HDR_ARRAY
  95. #include <array>