Uploaded image for project: 'OpenVDB'
  1. OpenVDB
  2. OVDB-99

Windows compilation error with isinf() and isnan() ?

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • None
    • Core
    • None

      Hi,

      I've had a bug reported where attempting to register Vec4<int> fails in Windows (Visual Studio 15 and Visual Studio 19).

      It appears the problem is a missing implementation of std::isinf(int). I see this method in math::Tuple which uses math::isFinite() that correctly handles integer types:

      bool isFinite() const {
          for (int i = 0; i < SIZE; ++i) {
              if (!math::isFinite(mm[i])) return false;
          }
          return true;
      }

      However, this one uses std::isinf():

      bool isInfinite() const {
          for (int i = 0; i < SIZE; ++i) {
              if (std::isinf(mm[i])) return true;
          }
          return false;
      }
      

      Any issues with fixing isInfinite() and isNan() in the same way using new math::isinfinite() and math::isnan() methods?

            Unassigned Unassigned
            danrbailey danrbailey
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: