aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Poletti <poletti.marco@gmail.com>2023-01-21 13:32:45 -0800
committerMarco Poletti <poletti.marco@gmail.com>2023-01-21 13:32:45 -0800
commit9042373725547bce32ce99b73a764312433a4c54 (patch)
tree67406e4118ad9b40aaac15b779a600c78a133d38
parent0159e138bbf13b28cd90a90cda117a15f23d959f (diff)
downloadgoogle-fruit-9042373725547bce32ce99b73a764312433a4c54.tar.gz
Change a using declaration into a typedef to workaround a bug in MSVC 2022.
-rw-r--r--include/fruit/impl/component_functors.defn.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/fruit/impl/component_functors.defn.h b/include/fruit/impl/component_functors.defn.h
index 3db690c..1df57d0 100644
--- a/include/fruit/impl/component_functors.defn.h
+++ b/include/fruit/impl/component_functors.defn.h
@@ -670,7 +670,8 @@ struct RegisterConstructorAsUniquePtrFactory {
auto provider = [](NakedArgs... args) {
return std::unique_ptr<NakedT>(new NakedT(std::forward<NakedArgs>(args)...));
};
- using RealOp = RegisterFactory(Comp, DecoratedSignature, Type<decltype(provider)>);
+ // Changed to typedef from a using declaration to workaround a bug in MSVC 2022.
+ typedef RegisterFactory RealOp(Comp, DecoratedSignature, Type<decltype(provider)>);
FruitStaticAssert(IsSame(GetResult(Op1), GetResult(RealOp)));
Eval<RealOp>()(entries);
};