-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Use int = 0
SFINAE in <memory>
to improve compiler throughput
#2124
Conversation
I tested the constructor: template <class _Fx, class _Alloc, typename _Mybase::template _Enable_if_callable_t<_Fx, function> = 0>
function(_Fx&& _Func) {
this->_Reset(_STD forward<_Fx>(_Func));
} #include <cstdio>
#include <functional>
using namespace std;
void test() {
puts("hi");
}
int main() {
function<void()> f = test;
f();
}
If someone knows what was the original repro it would be nice to test it. |
Regarding CUDA, I believe we retained the workaround out of caution, not because we had an actual repro. Now that we've updated to CUDA 11.6, removing the workaround seems like the right thing to do (we can always put it back if necessary). |
int = 0
SFINAE in <memory>
to improve compiler throughput
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Reported VSO-1595465 " |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for modernizing these last remaining traces of old-style SFINAE! 🚀 ✨ 😺 |
Fixes #248
Similar to https://github.com/microsoft/STL/pull/244/files
and transition now applies only to CUDA:
STL/stl/inc/functional
Lines 847 to 851 in a9321cf