Skip to content
Snippets Groups Projects
  1. Jul 17, 2015
  2. Jul 11, 2015
  3. Jul 10, 2015
  4. Jul 03, 2015
    • Steffen Müthing's avatar
      [IteratorRange][Release] Make IteratorRange default-constructible and copyable · 2c9596f9
      Steffen Müthing authored
      IteratorRanges are convenient for storing ranges of iterators into a
      larger container, e.g. for the per-codim GeometryTypes in an
      IndexSet. Unfortunately, you can't just create an array of
      IteratorRanges right now because they can neither be copied, nor are
      they default-constructible.
      
      This patch fixes that problem and also adds a second typedef
      const_iterator to make IteratorRange work in contexts where the
      iterating code isn't using range-based for and assumes a const object.
      2c9596f9
  5. Jun 30, 2015
  6. Jun 29, 2015
  7. Jun 19, 2015
  8. Jun 17, 2015
  9. Jun 16, 2015
  10. Jun 13, 2015
  11. May 25, 2015
  12. May 12, 2015
  13. May 11, 2015
    • Ansgar Burchardt's avatar
      [release] debugallocator: use unsigned integer type for pointer arithmetic · 1659ea4b
      Ansgar Burchardt authored
      ptrdiff_t is a signed integer type and so the expression
        (std::uintptr_t)(ptr) % page_size
      could become a negative value. In this case the page_ptr would be the
      address of the next page after the allocation.
      
      This wrong behaviour could be observed on (32bit) PowerPC: here
      ptr was 0xf78cfe00 and page_ptr was calculated as 0xf78d0000 instead
      of the correct 0xf78c0000.
      1659ea4b
    • Steffen Müthing's avatar
      [Release][Bugfix] Fix bigunsignedint numeric_limits for clang/libc++ · a7951dff
      Steffen Müthing authored
      The std::numeric_limits specialization for bigunsignedint requires
      access to the internal state of bigunsignedint. Previously, the correct
      specialization of std::numeric_limits was a friend of bigunsignedint,
      but that creates problems on recent versions of clang with the
      alternative libc++ library, because that library declares the base
      template of std::numeric_limits as a class and clang subsequently
      complains if the friend declaration uses 'struct'. Unfortunately,
      libstdc++ uses a struct, making it impossible to keep clang happy for
      both standard libraries. So we introduce a helper class that provides
      access to the internal state and which now becomes a friend of
      bigunsignedint. The numeric_limits specialization inherits from the
      helper to use it.
      a7951dff
    • Steffen Müthing's avatar
    • Steffen Müthing's avatar
      [Bugfix][Release] Add typedefs to std::hash specializations for standard compliance · a64ca159
      Steffen Müthing authored
      According to the standard, all specializations of std::hash must export
      argument_type and result_type [20.8.12/1]. The version of libc++ (LLVM's
      alternative C++ standard library) tripped over this requirement on my
      machine, so this patch adds the typedefs.
      a64ca159
    • Ansgar Burchardt's avatar
      Rework bigunsignedinttest.cc. · c859558d
      Ansgar Burchardt authored
      c859558d
    • Ansgar Burchardt's avatar
    • Ansgar Burchardt's avatar
      bigunsignedint: Fix operator-. · fef5f72e
      Ansgar Burchardt authored
      fef5f72e
    • Ansgar Burchardt's avatar
    • Ansgar Burchardt's avatar
      bigunsignedint: make overload unambiguous for all integer types · 7d2a12f8
      Ansgar Burchardt authored
      With just the two overloaded constructors
      
        bigunsignedint(int)
        bigunsigendint(uintmax_t)
      
      trying to call the constructor with any integer type T different from
      int and uintmax_t results in an ambiguous call: the promotion of T to
      either int or uintmax_t are ranked the same. (Note that this does not
      depend on the specific choice of int and uintmax_t.)
      
      This patch provides a templated constructor for all signed integer
      types which is ranked over the constructor taking an uintmax_t, making
      overload resolution unambiguous for signed integer types. By also
      "hiding" it for unsigned types using enable_if, the overload
      resolution for unsigned integer types is also unambiguous; there is
      only a single viable candidate left: the one taking an uintmax_t.
      7d2a12f8
    • Ansgar Burchardt's avatar
      Use fixed-width integer types (C++11) · 541b3dfc
      Ansgar Burchardt authored
      Use the fixed-width integer types introduced in C++11 instead of
      making assumptions on the size of integers. The following changes were
      implemented:
      
      unsigned short used to store the bigunsignedint:
        Changed type to uint16_t. The implementation requires this to be a
        16-bit type.
      
      int, unsigned int used to store intermediates:
        Changed type to (u)int_fast32_t. This is enough to hold sums, products
        or differences of two uint16_t integers.
      
      std::size_t used as parameter in constructor and arithmetic operators:
        Changed type to uintmax_t. Any unsigned integer type should be usable
        in conjunction with bigunsignedint.
      
      Return value of touint() member function:
        Changed type to uint_least32_t. The current implementation only
        returns the last two "digits" (of 16 bits each).
      541b3dfc
  14. May 08, 2015
  15. May 06, 2015
Loading