[Paraview-developers] vtkOSPRayRendererNode.cxx: error: ‘isnan’ was not declared

David E DeMarle dave.demarle at kitware.com
Wed Oct 26 10:22:49 EDT 2016


better yet vtkMath::IsNan()

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Wed, Oct 26, 2016 at 8:52 AM, Haocheng Liu <haocheng.liu at kitware.com>
wrote:

>
>
> On Wed, Oct 26, 2016 at 8:31 AM, David E DeMarle <dave.demarle at kitware.com
> > wrote:
>
>> Thanks Jean.
>>
>> Mind filing a issue report on VTK's gitlab to help me keep track of this?
>>
>> https://gitlab.kitware.com/vtk/vtk/issues
>>
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909
>>
>> On Wed, Oct 26, 2016 at 7:50 AM, Favre Jean <jfavre at cscs.ch> wrote:
>>
>>> Hello developers
>>>
>>> I switched to a new machine with a newer compiler.
>>>
>>> g++ (Ubuntu 5.4.0) does not like
>>>
>>> vtkOSPRayRendererNode.cxx:124:36: error: ‘isnan’ was not declared in
>>> this scope
>>>
>>> I corrected to the following line to make it compile cleanly:
>>>
>>> if (std::isnan(ospDepthBuffer[i]))
>>>
>>> This is both in ParaView master, and 5.2RC2
>>>
>> Hi all,
>
> I encountered the  same isnan problem when working on CMB projects, and
> here is my solution to solve the problem once for all:
>
> ```C++
> #if defined (__GNUC__) && (__GNUC__ > 4) && (__cplusplus)
> #  include <cmath>
> using std::isnan;
> #else
> #  include <math.h>
> #endif
> ```
>
> It works fine on Ubuntu 14.04(with GCC4.8) and Ubuntu 16.04(with GCC
> 5.4.1). Mac and Windows are also happy with it.
>
> Hope it helps.
>
>
>>
>>>
>>
>>> -----------------
>>> Jean
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Search the list archives at: http://markmail.org/search/?q=
>>> Paraview-developers
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>>
>>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at: http://markmail.org/search/?q=
>> Paraview-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>
>>
>
>
> --
> Best regards
> Haocheng
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20161026/ce6a3b77/attachment.html>


More information about the Paraview-developers mailing list