-
Notifications
You must be signed in to change notification settings - Fork 33
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
Modernization refactorization #123
base: master
Are you sure you want to change the base?
Conversation
I am having some trouble building this PR. I am probably doing something wrong. Any ideas?
|
That's weird. Since the enum is declared inside of a class, it shouldn't violate the one definition rule. The spec even states
It also compiles for me. What compiler are you using that gives this error? |
If you change the definition from |
Hi Joe,
Changing to enum class fails with other errors:
I installed abseil using the following steps:
I know there is a lot of flux in the C++ world these days, do we want to remain mostly backwards compatible or do we move our minimum requirements to c++14 ? I dont see any problem with moving on as long as we have a working docker build environment. |
Interesting. I think it's a gcc bug. Here's a minimal example: https://godbolt.org/z/YdkLxW This can be fixed by specifying the namespace: https://godbolt.org/z/dLm3ct I'm updating the PR to support this. I think we can stay with C++11 for now until we have a real need to raise the minimum requirements. |
PR updated. Give it a try |
Merge conflicts resolved. @scudette have you gotten a chance to look at this since I fixed the issues? |
Since we've discussed bumping the major version number on the next release, I figured this was a good time to further break the public API a bit (your big refactor in March already broke it anyway).
This PR does a significant amount of refactoring around modernization of the codebase. It tries to accomplish a number of things:
When possible, all manual memory management has been removed. A few edge cases where that wasn't possible were documented.
Due to [1] the public C++ API to add command line arguments to imagers has been changed.
In order to facilitate [1] and to improve type safety, the way object attributes are stored and queried has been significantly changed. This seems to improve usability quite a bit and now queried attribute values can be queried for type, compared against other queried values and AFF4 objects, and are type safe via use of a variant instead of raw pointers to inherited objects.
NOTE
This PR does add a new dependency on Google's abseil libraries, so the docker file and build instructions will need to be updated (not really my strong suit). The addition of abseil is nice, because the lightweight library gives us access to many C++14 and C++17 standard library enhancements without having to raise the minimum requirement of the project from C++11. If compiled against a later standard which already has these features (see PR #122), abseil quietly defaults to the standard library implementation instead of their own.