From 54cbdc4812c52894b1dbb34c786769e852f84f8c Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 21 Feb 2017 13:46:43 -0800 Subject: [core] Move ignore.hpp to public include directory --- cmake/core-files.cmake | 2 +- include/mbgl/util/ignore.hpp | 26 ++++++++++++++++++++++++++ src/mbgl/util/ignore.hpp | 26 -------------------------- 3 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 include/mbgl/util/ignore.hpp delete mode 100644 src/mbgl/util/ignore.hpp diff --git a/cmake/core-files.cmake b/cmake/core-files.cmake index 98200900d5..1a1f400163 100644 --- a/cmake/core-files.cmake +++ b/cmake/core-files.cmake @@ -447,6 +447,7 @@ set(MBGL_CORE_FILES include/mbgl/util/geo.hpp include/mbgl/util/geojson.hpp include/mbgl/util/geometry.hpp + include/mbgl/util/ignore.hpp include/mbgl/util/image.hpp include/mbgl/util/interpolate.hpp include/mbgl/util/logging.hpp @@ -490,7 +491,6 @@ set(MBGL_CORE_FILES src/mbgl/util/http_timeout.hpp src/mbgl/util/i18n.cpp src/mbgl/util/i18n.hpp - src/mbgl/util/ignore.hpp src/mbgl/util/indexed_tuple.hpp src/mbgl/util/interpolate.cpp src/mbgl/util/intersection_tests.cpp diff --git a/include/mbgl/util/ignore.hpp b/include/mbgl/util/ignore.hpp new file mode 100644 index 0000000000..577bcf4d91 --- /dev/null +++ b/include/mbgl/util/ignore.hpp @@ -0,0 +1,26 @@ +#pragma once + +#include + +namespace mbgl { +namespace util { + +// Accept any number of parameters of any types, and do nothing with them. +// Useful for providing a context for parameter pack expansion where a legal +// expansion context is not otherwise available. +// +// See https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md +// for more details. +// +template void ignore(Ts&&...) {} + +// std::initializer_list overload, for situations where you need sequenced +// modifications. +// +template void ignore(const std::initializer_list&) {} + +// Handle the zero-argument case. +inline void ignore(const std::initializer_list&) {} + +} // namespace util +} // namespace mbgl diff --git a/src/mbgl/util/ignore.hpp b/src/mbgl/util/ignore.hpp deleted file mode 100644 index 577bcf4d91..0000000000 --- a/src/mbgl/util/ignore.hpp +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once - -#include - -namespace mbgl { -namespace util { - -// Accept any number of parameters of any types, and do nothing with them. -// Useful for providing a context for parameter pack expansion where a legal -// expansion context is not otherwise available. -// -// See https://github.com/mapbox/cpp/blob/master/C%2B%2B%20Structural%20Metaprogramming.md -// for more details. -// -template void ignore(Ts&&...) {} - -// std::initializer_list overload, for situations where you need sequenced -// modifications. -// -template void ignore(const std::initializer_list&) {} - -// Handle the zero-argument case. -inline void ignore(const std::initializer_list&) {} - -} // namespace util -} // namespace mbgl -- cgit v1.2.1