-
Notifications
You must be signed in to change notification settings - Fork 21
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
CTAD for simple_ptr_holder #1701
CTAD for simple_ptr_holder #1701
Conversation
launch jenkins |
launch jenkins |
launch jenkins |
// CTAD for aggregates works | ||
#else | ||
// Enables CTAD in C++17. | ||
simple_ptr_holder() = default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default ctor only there for some test cases that rely on default init.
GT_TARGET GT_FORCE_INLINE constexpr T const &operator()() const { return m_val; } | ||
}; | ||
|
||
template <class T> | ||
constexpr simple_ptr_holder<T> make_simple_ptr_holder(T const &ptr) { | ||
[[deprecated("use simple_ptr_holder class template argument deduction")]] constexpr simple_ptr_holder<T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure you want to keep the maker? I thought it is not the part of the public API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll keep it for now.
Not sure if it's worth trading aggregate for CTAD. When I looked at make_simple_ptr_holder, I missed that aggregate CTAD is a C++20 feature.