From 69fbe647abe3942ced02f14f0adc477630d9dd7e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 9 Dec 2019 11:33:08 -0500 Subject: DRTVWR-494: VS 2013 can't yet handle variadic llmake(). --- indra/llcommon/llmake.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'indra/llcommon') diff --git a/indra/llcommon/llmake.h b/indra/llcommon/llmake.h index 02463d97ea..f901ee2bf1 100644 --- a/indra/llcommon/llmake.h +++ b/indra/llcommon/llmake.h @@ -23,6 +23,9 @@ #if ! defined(LL_LLMAKE_H) #define LL_LLMAKE_H +// If we're using a compiler newer than VS 2013, use variadic llmake(). +#if (! defined(_MSC_VER)) || (_MSC_VER > 1800) + /** * Usage: llmake(args...) * @@ -35,6 +38,22 @@ CLASS_TEMPLATE llmake(ARGS && ... args) return CLASS_TEMPLATE(std::forward(args)...); } +#else // older implementation for VS 2013 + +template class CLASS_TEMPLATE, typename ARG1> +CLASS_TEMPLATE llmake(const ARG1& arg1) +{ + return CLASS_TEMPLATE(arg1); +} + +template class CLASS_TEMPLATE, typename ARG1, typename ARG2> +CLASS_TEMPLATE llmake(const ARG1& arg1, const ARG2& arg2) +{ + return CLASS_TEMPLATE(arg1, arg2); +} + +#endif // VS 2013 workaround + /// dumb pointer template just in case that's what's wanted template using dumb_pointer = T*; -- cgit v1.2.3