From 3e1c01bb5f46ddd08e73b599c482fdfc5abf77ab Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 21 Nov 2016 12:43:26 +0200 Subject: Make types array in function machinery constexpr --- build2/function.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build2/function.cxx') diff --git a/build2/function.cxx b/build2/function.cxx index ec70529..2f2db51 100644 --- a/build2/function.cxx +++ b/build2/function.cxx @@ -257,7 +257,11 @@ namespace build2 throw failed (); } +#if !defined(_MSC_VER) || _MSC_VER > 1900 + constexpr const optional* function_args<>::types; +#else const optional* const function_args<>::types = nullptr; +#endif void function_family::entry:: insert (string n, function_overload f) const -- cgit v1.1