Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed MSVC12 compilation error in test_buffers.cpp #1548

Closed
wants to merge 2 commits into from
Closed

fixed MSVC12 compilation error in test_buffers.cpp #1548

wants to merge 2 commits into from

Conversation

cmcmurrough
Copy link
Contributor

MSVC 12 complains about an ambiguous type on a couple of test checks, added (double) cast to fix.

if (isnan (eptr[j]))
EXPECT_TRUE (isnan (buffer[j]));
if (isnan ((double) eptr[j]))
EXPECT_TRUE (isnan ((double) buffer[j]));
else
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this. eptr is of template type T and I assume buffer is something similar. It doesn't make sense to cast them always to double...

@taketwo
Copy link
Member

taketwo commented Feb 23, 2016

I agree with what Sergio wrote. Could you try to replace isnan with pcl_isnan and see if it helps?

@SergioRAgostinho SergioRAgostinho added this to the pcl-1.8.1 milestone Jul 14, 2016
@SergioRAgostinho SergioRAgostinho added the needs: author reply Specify why not closed/merged yet label Jul 14, 2016
@SergioRAgostinho
Copy link
Member

SergioRAgostinho commented Aug 20, 2016

@UnaNancyOwen are you by any chance still running MSVC12? I have the impression the earliest you have now is MSVC13. Nevertheless can you give a go at this test and see if the compiler complains about it?

@UnaNancyOwen
Copy link
Member

UnaNancyOwen commented Aug 20, 2016

@SergioRAgostinho @taketwo I tried tested with MSVC12 and MSVC14.
It can successfully build when replace to pcl_isnan() from isnan().

if (pcl_isnan (eptr[j]))
  EXPECT_TRUE (pcl_isnan (buffer[j]));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants