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

Compiling Errors with C++20 in NN_NO_CHECK #3868

Closed
loftyscholar opened this issue Sep 1, 2023 · 0 comments · Fixed by #3869
Closed

Compiling Errors with C++20 in NN_NO_CHECK #3868

loftyscholar opened this issue Sep 1, 2023 · 0 comments · Fixed by #3869
Assignees
Labels

Comments

@loftyscholar
Copy link

I compile the package with msvc 2019 using the C++20 (i.e., ISO C++20 standard (/std:c++20)), and some errors occured.

It indicated problems from "NN_NO_CHECK"

#define NN_NO_CHECK(p)
::dropbox::oxygen::nn<typename std::remove_const<
typename std::remove_reference<decltype(p)>::type>::type>(
dropbox::oxygen::i_promise_i_checked_for_null, (p))

How should I resolve these problems?

Thanks!

1>D:\opensource\gdalvs2019\proj-9.2.1(c20)\src\iso19111\operation\coordinateoperationfactory.cpp(3777,49): error C2039: "type": is not a member of "std"
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\algorithm(40): message : 参见“std”的声明
1>D:\opensource\gdalvs2019\proj-9.2.1(c20)\src\iso19111\operation\coordinateoperationfactory.cpp(3800,36): error C2039: "type": is not a member of "std"
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\algorithm(40): message : 参见“std”的声明
1>D:\opensource\gdalvs2019\proj-9.2.1(c20)\src\iso19111\operation\coordinateoperationfactory.cpp(3844,23): error C2039: "type": is not a member of "std"
……

Example of problem

Demonstrate the problem you have found, either by using PROJ tools like cs2cs, cct or projinfo or add a code snippet that highlights the problem using the PROJ C/C++ API.
A "Minimal, Complete and Verifiable Example" will make it much easier for maintainers to help you:
http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports

# Your code here

Problem description

[this should explain why the current behavior is a problem and why the expected output is a better solution.]

Expected Output

Environment Information

  • PROJ version (proj)
  • Operation System Information

Installation method

  • conda, apt-get, from source, etc...
@rouault rouault self-assigned this Sep 1, 2023
rouault added a commit to rouault/PROJ that referenced this issue Sep 1, 2023
(fixes OSGeo#3868)

For some weird reason, the previous definition of the macro didn't work
when used from lambdas.
rouault added a commit that referenced this issue Sep 1, 2023
(fixes #3868)

For some weird reason, the previous definition of the macro didn't work
when used from lambdas.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants