From 71105e0b0741416d86d48973c16a6002a4ce7449 Mon Sep 17 00:00:00 2001 From: gabime Date: Sat, 12 Feb 2022 13:59:12 +0200 Subject: [PATCH] Fixed #2227 --- example/example.cpp | 2 +- include/spdlog/fmt/ranges.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 include/spdlog/fmt/ranges.h diff --git a/example/example.cpp b/example/example.cpp index f8ad03c1..c379c746 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -192,7 +192,7 @@ void binary_example() // Log a vector of numbers #ifndef SPDLOG_USE_STD_FORMAT -# include "spdlog/fmt/bundled/ranges.h" +# include "spdlog/fmt/ranges.h" void vector_example() { std::vector vec = {1, 2, 3}; diff --git a/include/spdlog/fmt/ranges.h b/include/spdlog/fmt/ranges.h new file mode 100644 index 00000000..9103a5f6 --- /dev/null +++ b/include/spdlog/fmt/ranges.h @@ -0,0 +1,22 @@ +// +// Copyright(c) 2016 Gabi Melman. +// Distributed under the MIT License (http://opensource.org/licenses/MIT) +// + +#pragma once +// +// include bundled or external copy of fmtlib's ranges support +// + +#if !defined(SPDLOG_USE_STD_FORMAT) +# if !defined(SPDLOG_FMT_EXTERNAL) +# ifdef SPDLOG_HEADER_ONLY +# ifndef FMT_HEADER_ONLY +# define FMT_HEADER_ONLY +# endif +# endif +# include +# else +# include +# endif +#endif