From 754d5f535e264b4f66927f91c12a721795b0f991 Mon Sep 17 00:00:00 2001 From: Andy Webber Date: Thu, 18 Dec 2014 17:27:59 -0500 Subject: [PATCH 1/3] Fixed strict aliasing violation. Changed C-style cast and dereference to std::memcpy. Exactly mirrors other code already in the file. --- include/boost/functional/hash/detail/hash_float.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/functional/hash/detail/hash_float.hpp b/include/boost/functional/hash/detail/hash_float.hpp index ee0ee87..eb9264f 100644 --- a/include/boost/functional/hash/detail/hash_float.hpp +++ b/include/boost/functional/hash/detail/hash_float.hpp @@ -68,7 +68,7 @@ namespace boost std::size_t seed = 0; if (length >= sizeof(std::size_t)) { - seed = *(std::size_t*) ptr; + std::memcpy(&seed, ptr, sizeof(std::size_t)); length -= sizeof(std::size_t); ptr += sizeof(std::size_t); From 8b19e7eaa0f76e936d89c06a788dbaa6359c62cb Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 10 Jan 2015 12:33:17 +0000 Subject: [PATCH 2/3] Release note for hash change. --- doc/changes.qbk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/changes.qbk b/doc/changes.qbk index aadeb97..35a2835 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -174,4 +174,9 @@ * Ongoing work on improving `hash_combine`. This changes the combine function which was previously defined in the reference documentation. +[h2 Boost 1.57.0] + +* Fixed strict aliasing violation + ([@https://github.com/boostorg/functional/pull/3 GitHub #3]). + [endsect] From 49773739648a5b4d0f6cdfdb05399e48eb29017b Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sat, 10 Jan 2015 13:10:15 +0000 Subject: [PATCH 3/3] Fix version number in release notes. --- doc/changes.qbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/changes.qbk b/doc/changes.qbk index 35a2835..f7ab411 100644 --- a/doc/changes.qbk +++ b/doc/changes.qbk @@ -174,7 +174,7 @@ * Ongoing work on improving `hash_combine`. This changes the combine function which was previously defined in the reference documentation. -[h2 Boost 1.57.0] +[h2 Boost 1.58.0] * Fixed strict aliasing violation ([@https://github.com/boostorg/functional/pull/3 GitHub #3]).