Use int = 0 SFINAE in <memory> to improve compiler throughput#2124
Use int = 0 SFINAE in <memory> to improve compiler throughput#2124StephanTLavavej merged 14 commits intomicrosoft:mainfrom
int = 0 SFINAE in <memory> to improve compiler throughput#2124Conversation
|
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