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

IsNull is not declared in MSVC because of __cplusplus #17

Closed
wisk opened this issue May 22, 2016 · 0 comments
Closed

IsNull is not declared in MSVC because of __cplusplus #17

wisk opened this issue May 22, 2016 · 0 comments

Comments

@wisk
Copy link

wisk commented May 22, 2016

Hi there,

This library is used by OGDF project which I used to display graph.
When I compile OGDF tests, vs compiler (cl) reports it can't find IsNull function.
The function is located here.
It seems the issue comes from cl since it defines __cplusplus variable to 199711L.
Please see this link for further information. Basically this value is not updated because cl doesn't fully support C++11.
As a workaround, I modified this line to test if the vs compiler version is above or equal to 1600, the oldest version which supports nullptr keyword.

-#if __cplusplus > 199711L
+#if __cplusplus > 199711L || _MSC_VER >= 1600

sbeyer added a commit that referenced this issue Nov 25, 2016
IsNull() is only available for C++11. However, older versions of
MSVC know nullptr and std::nullptr_r and can also handle IsNull().
This commit uses the workaround given by @wisk in issue #17 to
enable IsNull() for MSVC version identifiers >= 1600.
sbeyer added a commit that referenced this issue Nov 25, 2016
IsNull() is only available for C++11. However, older versions of
MSVC know nullptr and std::nullptr_r and can also handle IsNull().
This commit uses the workaround proposed by @wisk in issue #17 to
enable IsNull() for MSVC version identifiers >= 1600.
sbeyer added a commit that referenced this issue Nov 25, 2016
IsNull() is only available for C++11. However, older versions of
MSVC know nullptr and std::nullptr_r and can also handle IsNull().
This commit uses the workaround proposed by @wisk in issue #17 to
enable IsNull() for MSVC version identifiers >= 1600.
sbeyer added a commit that referenced this issue Nov 25, 2016
IsNull() is only available for C++11. However, older versions of
MSVC know nullptr and std::nullptr_r and can also handle IsNull().
This commit uses the workaround proposed by @wisk in issue #17 to
enable IsNull() for MSVC version identifiers >= 1600.
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

No branches or pull requests

1 participant