mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
Works around the regressive behavior in the VSC++ compiler for VS2017 where the variadic templates would not compile correctly. Issue should be patched in future versions, so for now it'll target the 1910 version specifically.
This commit is contained in:
parent
8780f83262
commit
f1921c26dd
1 changed files with 10 additions and 0 deletions
|
|
@ -108,7 +108,17 @@ private:
|
|||
std::tie(std::get<I + (sizeof...(ArgTs) - sizeof...(TailTs))>(args)...) = defaultArgs;
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER == 1910
|
||||
template<typename ...TailTs>
|
||||
struct DodgyVCHelper
|
||||
{
|
||||
using type = typename std::enable_if<sizeof...(TailTs) <= sizeof...(ArgTs), decltype(mArgs)>::type;
|
||||
};
|
||||
|
||||
template<typename ...TailTs> using MaybeSelfEnabled = typename DodgyVCHelper<TailTs...>::type;
|
||||
#else
|
||||
template<typename ...TailTs> using MaybeSelfEnabled = typename std::enable_if<sizeof...(TailTs) <= sizeof...(ArgTs), decltype(mArgs)>::type;
|
||||
#endif
|
||||
|
||||
template<typename ...TailTs> static MaybeSelfEnabled<TailTs...> tailInit(TailTs ...tail) {
|
||||
std::tuple<DefVST<ArgTs>...> argsT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue