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

version of c++ #1

Closed
vitiennam opened this issue Oct 2, 2018 · 3 comments
Closed

version of c++ #1

vitiennam opened this issue Oct 2, 2018 · 3 comments

Comments

@vitiennam
Copy link

HI,

I try to run BinaryImageConverter.cpp on Clion but it have trouble:
Binarization/Image.hpp:127:47: error: expected ‘,’ or ‘...’ before ‘default’
inline Pixel32 Pixel(int x, int y, Pixel32 default) const { return (x < 0 || x >= width || y < 0 || y >= height) ? default: Pixel(x, y); }

Binarization/Image.hpp:127:119: error: expected ‘:’ before ‘default’
Binarization/Image.hpp:127:119: error: expected primary-expression before ‘default’
Binarization/Image.hpp:127:119: error: expected ‘;’ before ‘default’
Binarization/Image.hpp:127:119: error: case label not within a switch statement

I am using c++ 11: set(CMAKE_CXX_STANDARD 11)

Thanks

@brandonmpetty
Copy link
Owner

Sorry for the delayed response. I just made a pretty large push today that included an update to all of the projects to leverage C++17 language features. Hopefully this will save you from having to make any manual changes to VS. Let me know if you run into any issues. Some projects are leveraging nested namespaces and the new file system api.

@brandonmpetty
Copy link
Owner

I had missed the fact that you were not using MSVC. While my earlier comment was correct, you will need C++17 support, the issue you described had nothing to do with it. This issue should be resolved with my latest commit. While I had originally developed this code-base on my MacBook using Clang, I had moved away from it in favor of the Visual Studio environment... and in the process sadly got tied into their Unit Testing framework along the way. I am trying to upgrade clang on my mac to a version that supports C++17, once I do that and verify everything is running correctly I will close this issue. Thank you for bringing it to my attention @kimchicanh.

@brandonmpetty
Copy link
Owner

All demo's can now be built with Clang (7.0) in addition to Microsoft's VS C++ compiler (15.4).

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

2 participants