~ubuntu-branches/ubuntu/wily/ruby-passenger/wily-proposed

« back to all changes in this revision

Viewing changes to ext/boost/functional/hash/detail/hash_float.hpp

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2013-11-23 23:50:02 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20131123235002-8fdhsq7afj15o2z2
Tags: 4.0.25-1
* New upstream release.
* Refresh fix_install_path.patch.
* Build for Ruby 2.0 instead of 1.8. (Closes: #725591)
* Add fix_ftbfs_fortify_source.patch.
* Install passenger template files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
                ptr += sizeof(std::size_t);
74
74
 
75
75
                while(length >= sizeof(std::size_t)) {
76
 
                    hash_float_combine(seed, *(std::size_t*) ptr);
 
76
                    std::size_t buffer = 0;
 
77
                    std::memcpy(&buffer, ptr, sizeof(std::size_t));
 
78
                    hash_float_combine(seed, buffer);
77
79
                    length -= sizeof(std::size_t);
78
80
                    ptr += sizeof(std::size_t);
79
81
                }
210
212
        template <class T>
211
213
        inline std::size_t float_hash_value(T v)
212
214
        {
 
215
#if defined(fpclassify)
 
216
            switch (fpclassify(v))
 
217
#elif BOOST_HASH_CONFORMANT_FLOATS
 
218
            switch (std::fpclassify(v))
 
219
#else
213
220
            using namespace std;
214
 
            switch (fpclassify(v)) {
 
221
            switch (fpclassify(v))
 
222
#endif
 
223
            {
215
224
            case FP_ZERO:
216
225
                return 0;
217
226
            case FP_INFINITE: