-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Add an etl::nullptr_t type to <etl/nullptr.h> #924
Add an etl::nullptr_t type to <etl/nullptr.h> #924
Conversation
Review changes with SemanticDiff. |
I'm so sorry for the mistakes, I'm a total beginner to C++ and I'm trying my best :/ |
After I'm done, I promise I'll squash the commits 😅 |
You can run the unit tests locally if you want to check before you push, though it does take some time to do all C++11/14/17/20 variants. |
Do you think this implementation of etl::nullptr_t is acceptable? It instantiates a Also, if you do think it's an acceptable solution, do you think I should add a |
….)::reset(ETL_NULLPTR) Remove default argument for the normal reset method of etl::unique_ptr (sorry, didn't notice 😬) Silence the unused argument warning Fix operator =(nullptr) Replace the nullptr_t enum with a class which acts more similar to C++11 nullptr
Do you think I should also delete etl::addressof(ETL_NULLPTR)? |
Well, I'll be waiting for a comment from you before squashing the commits |
I'll have a look tomorrow. |
22dc6b2
into
ETLCPP:pull-request/#924-Add-an-etl--nullptr_t-type-to-etl-nullptr.h
…lptr.h' into development
* Add an etl::nullptr_t type * etlcpp/etl issue #921 (etl::unique_ptr reset): add etl::unique_ptr(...)::reset(ETL_NULLPTR) Remove default argument for the normal reset method of etl::unique_ptr (sorry, didn't notice 😬) Silence the unused argument warning Fix operator =(nullptr) Replace the nullptr_t enum with a class which acts more similar to C++11 nullptr * Add member pointer support and delete the addressof operator * "Delete" etl::addressof(ETL_NULLPTR) * Ensure compatibility with C++98 * ACTUALLY ensure compatibility with C++98 I'm stupid :/ * Correct definition according to cppreference
Well, the title is self-explanatory. This is a tiny change anyway, and the code is basically what's proposed in #922.
Edit: As of this moment, I changed the pre-C++11 code from an enum into a custom class