From 659cdca5dcffeb98b908421bff1fc3579d0d83b7 Mon Sep 17 00:00:00 2001 From: Howard Hinnant Date: Mon, 9 Jan 2017 21:01:39 -0500 Subject: [PATCH] Only define get_windows_zones_install() under TIMEZONE_MAPPING --- tz.cpp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/tz.cpp b/tz.cpp index bf7e4b4..d05faab 100644 --- a/tz.cpp +++ b/tz.cpp @@ -261,22 +261,6 @@ get_download_gz_file(const std::string& version) return file; } -static -const std::string& -get_windows_zones_install() -{ - static const std::string install -#ifndef WINDOWSZONES_INSTALL - = get_install(); -#else -# define STRINGIZEIMP(x) #x -# define STRINGIZE(x) STRINGIZEIMP(x) - = STRINGIZE(WINDOWSZONES_INSTALL); -#endif - std::cout << install << std::endl; - return install; -} - // These can be used to reduce the range of the database to save memory CONSTDATA auto min_year = date::year::min(); CONSTDATA auto max_year = date::year::max(); @@ -302,6 +286,21 @@ static_assert(min_year <= max_year, "Configuration error"); namespace // Put types in an anonymous name space. { +const std::string& +get_windows_zones_install() +{ + static const std::string install +#ifndef WINDOWSZONES_INSTALL + = get_install(); +#else +# define STRINGIZEIMP(x) #x +# define STRINGIZE(x) STRINGIZEIMP(x) + = STRINGIZE(WINDOWSZONES_INSTALL); +#endif + std::cout << install << std::endl; + return install; +} + // A simple type to manage RAII for key handles and to // implement the trivial registry interface we need. // Not intended to be general-purpose.