core: rename mbgl namespace to mln (#4487)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Bart Louwers
2026-08-14 23:25:20 +02:00
committed by GitHub
parent 836b862984
commit 550f64be22
1970 changed files with 8931 additions and 8967 deletions

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <filesystem>
namespace mbgl {
namespace mln {
namespace util {
@@ -65,4 +65,4 @@ public:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <string>
namespace mbgl {
namespace mln {
namespace util {
@@ -117,4 +117,4 @@ protected:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -2,11 +2,11 @@
#include <mbgl/util/noncopyable.hpp>
namespace mbgl {
namespace mln {
class AsyncRequest : private util::noncopyable {
public:
virtual ~AsyncRequest() = default;
};
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <memory>
#include <functional>
namespace mbgl {
namespace mln {
namespace util {
class AsyncTask : private util::noncopyable {
@@ -21,4 +21,4 @@ private:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -3,13 +3,13 @@
#include <mbgl/util/traits.hpp>
#include <mbgl/util/util.hpp>
namespace mbgl {
namespace mln {
template <typename Enum>
constexpr Enum operator|(Enum a, Enum b) {
static_assert(std::is_enum_v<Enum>, "Enum must be an enum type");
// NOLINTNEXTLINE(clang-analyzer-optin.core.EnumCastOutOfRange)
return Enum(mbgl::underlying_type(a) | mbgl::underlying_type(b));
return Enum(mln::underlying_type(a) | mln::underlying_type(b));
}
template <typename Enum>
@@ -21,13 +21,13 @@ constexpr Enum& operator|=(Enum& a, Enum b) {
template <typename Enum>
constexpr bool operator&(Enum a, Enum b) {
static_assert(std::is_enum_v<Enum>, "Enum must be an enum type");
return bool(mbgl::underlying_type(a) & mbgl::underlying_type(b));
return bool(mln::underlying_type(a) & mln::underlying_type(b));
}
template <typename Enum>
constexpr Enum operator~(Enum value) {
static_assert(std::is_enum_v<Enum>, "Enum must be an enum type");
return Enum(~mbgl::underlying_type(value));
return Enum(~mln::underlying_type(value));
}
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <streambuf>
namespace mbgl {
namespace mln {
namespace util {
// ref https://artofcode.wordpress.com/2010/12/12/deriving-from-stdstreambuf/
@@ -54,4 +54,4 @@ private:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <string>
#include <type_traits>
namespace mbgl {
namespace mln {
using Clock = std::chrono::steady_clock;
@@ -59,4 +59,4 @@ constexpr std::chrono::duration<Rep, Period> abs(std::chrono::duration<Rep, Peri
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <memory>
#include <string>
namespace mbgl {
namespace mln {
/**
* @brief Holds values for client options.
@@ -59,4 +59,4 @@ private:
std::unique_ptr<Impl> impl_;
};
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <array>
#include <optional>
namespace mbgl {
namespace mln {
// Stores a premultiplied color, with all four channels ranging from 0..1
class Color {
@@ -46,8 +46,8 @@ public:
std::string stringify() const;
std::array<double, 4> toArray() const;
operator std::array<float, 4>() const { return {r, g, b, a}; }
mbgl::Value toObject() const;
mbgl::Value serialize() const;
mln::Value toObject() const;
mln::Value serialize() const;
};
inline bool operator==(const Color& colorA, const Color& colorB) {
@@ -64,4 +64,4 @@ inline Color operator*(const Color& color, float alpha) {
return {color.r * alpha, color.g * alpha, color.b * alpha, color.a * alpha};
}
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <cstdint>
#include <string>
namespace mbgl {
namespace mln {
namespace util {
enum CompressionFormat {
@@ -20,4 +20,4 @@ std::string decompress(const std::string& raw, int windowBits = CompressionForma
std::uint32_t crc32(const void* raw, size_t size) noexcept;
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <cmath>
#include <cstddef>
namespace mbgl {
namespace mln {
namespace util {
@@ -90,4 +90,4 @@ extern const bool shapingWarning;
} // namespace debug
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <unordered_set>
#endif
namespace mbgl {
namespace mln {
#if MLN_USE_UNORDERED_DENSE
template <typename Key, typename Value, typename Hash = std::hash<Key>>
using unordered_map = ankerl::unordered_dense::map<Key, Value, Hash>;
@@ -20,4 +20,4 @@ using unordered_map = std::unordered_map<Key, Value, Hash>;
template <typename Value>
using unordered_set = std::unordered_set<Value>;
#endif
} // namespace mbgl
} // namespace mln

View File

@@ -11,7 +11,7 @@
#include <optional>
#include <string>
namespace mbgl {
namespace mln {
namespace util {
template <typename To, typename From, std::size_t Size>
@@ -44,7 +44,7 @@ template <typename T>
std::enable_if_t<std::is_integral_v<T>, std::optional<T>> parse(std::string_view str, int base = 10) noexcept {
static_assert(std::is_same_v<T, int32_t> || std::is_same_v<T, uint32_t> || std::is_same_v<T, int64_t> ||
std::is_same_v<T, uint64_t>,
"Unsupported integral type in mbgl::util::parse<T>.");
"Unsupported integral type in mln::util::parse<T>.");
char* end = nullptr;
errno = 0;
@@ -70,7 +70,7 @@ std::enable_if_t<std::is_integral_v<T>, std::optional<T>> parse(std::string_view
template <typename T>
std::enable_if_t<std::is_floating_point_v<T>, std::optional<T>> parse(std::string_view str) noexcept {
static_assert(std::is_same_v<T, float> || std::is_same_v<T, double> || std::is_same_v<T, long double>,
"Unsupported floating point type in mbgl::util::parse<T>.");
"Unsupported floating point type in mln::util::parse<T>.");
char* end = nullptr;
errno = 0;
@@ -89,4 +89,4 @@ std::enable_if_t<std::is_floating_point_v<T>, std::optional<T>> parse(std::strin
}
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <string>
namespace mbgl {
namespace mln {
namespace util {
class DefaultStyle {
@@ -20,4 +20,4 @@ private:
};
} // end namespace util
} // end namespace mbgl
} // end namespace mln

View File

@@ -7,7 +7,7 @@
#include <string>
#include <optional>
namespace mbgl {
namespace mln {
template <typename T>
class Enum {
@@ -36,4 +36,4 @@ public:
return it == std::end(T##_names) ? std::optional<T>() : it->first; \
}
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
enum class EventSeverity : uint8_t {
Debug,
@@ -55,4 +55,4 @@ constexpr Event disabledEvents[] = {
constexpr EventPermutation disabledEventPermutations[] = {{.severity = EventSeverity::Debug, .event = Event::Shader}};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <stdexcept>
namespace mbgl {
namespace mln {
namespace util {
struct Exception : std::runtime_error {
@@ -48,4 +48,4 @@ struct NotFoundException : Exception {
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <nonstd/expected.hpp>
namespace mbgl {
namespace mln {
template <class T, class E>
using expected = nonstd::expected<T, E>;
@@ -10,4 +10,4 @@ using expected = nonstd::expected<T, E>;
template <class E>
using unexpected = nonstd::unexpected_type<E>;
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <optional>
#include <unordered_map>
namespace mbgl {
namespace mln {
using Value = mapbox::base::Value;
using NullValue = mapbox::base::NullValue;
@@ -54,4 +54,4 @@ inline std::optional<std::string> featureIDtoString(const FeatureIdentifier& id)
[](const auto&) -> std::optional<std::string> { return std::nullopt; });
}
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <vector>
#include <set>
namespace mbgl {
namespace mln {
// An array of font names
using FontStack = std::vector<std::string>;
@@ -22,4 +22,4 @@ struct FontStackHasher {
// Statically evaluate layer properties to determine what font stacks are used.
std::set<FontStack> fontStacks(const std::vector<Immutable<style::Layer::Impl>>&);
} // namespace mbgl
} // namespace mln

View File

@@ -12,7 +12,7 @@
#include <cmath>
#include <stdexcept>
namespace mbgl {
namespace mln {
class CanonicalTileID;
class UnwrappedTileID;
@@ -244,4 +244,4 @@ struct LatLngAltitude {
double altitude = 0.0;
};
} // namespace mbgl
} // namespace mln

View File

@@ -3,10 +3,10 @@
#include <mapbox/geojson.hpp>
#include <mbgl/util/feature.hpp>
namespace mbgl {
namespace mln {
using GeoJSON = mapbox::geojson::geojson;
using FeatureCollection = mapbox::geojson::feature_collection;
using FeatureExtensionValue = mapbox::util::variant<Value, FeatureCollection>;
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <mapbox/geometry/point_arithmetic.hpp>
#include <mapbox/geometry/for_each_point.hpp>
namespace mbgl {
namespace mln {
enum class FeatureType : uint8_t {
Unknown = 0,
@@ -83,4 +83,4 @@ auto forEachPoint(const Geometry<T> &g, F f) {
mapbox::geometry::for_each_point(g, f);
}
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <functional>
#include <type_traits>
namespace mbgl {
namespace mln {
namespace util {
template <class T>
@@ -47,4 +47,4 @@ TKey order_independent_hash(std::remove_const_t<TIter> cur, const TIter end) noe
}
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
namespace util {
/**
@@ -57,11 +57,11 @@ inline std::string toString(const util::SimpleIdentity& ident) {
}
} // namespace util
} // namespace mbgl
} // namespace mln
template <>
struct std::hash<mbgl::util::SimpleIdentity> {
std::size_t operator()(const mbgl::util::SimpleIdentity& s) const noexcept {
struct std::hash<mln::util::SimpleIdentity> {
std::size_t operator()(const mln::util::SimpleIdentity& s) const noexcept {
return std::hash<std::int64_t>{}(s.id());
}
};

View File

@@ -2,7 +2,7 @@
#include <initializer_list>
namespace mbgl {
namespace mln {
namespace util {
/// Accept any number of parameters of any types, and do nothing with them.
@@ -24,4 +24,4 @@ void ignore(const std::initializer_list<T>&) noexcept {}
inline void ignore(const std::initializer_list<int>&) noexcept {}
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -9,7 +9,7 @@
#include <memory>
#include <algorithm>
namespace mbgl {
namespace mln {
enum class ImageAlphaMode {
Unassociated,
@@ -179,4 +179,4 @@ using AlphaImage = Image<ImageAlphaMode::Exclusive>;
PremultipliedImage decodeImage(const std::string&);
std::string encodePNG(const PremultipliedImage&);
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <memory>
namespace mbgl {
namespace mln {
/**
* `Mutable<T>` is a non-nullable uniquely owning reference to a `T`. It can be
@@ -135,4 +135,4 @@ void mutate(Immutable<T>& immutable, Fn&& fn) {
immutable = std::move(mut);
}
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <tuple>
#include <type_traits>
namespace mbgl {
namespace mln {
template <class T, class... Ts>
struct TypeIndex;
@@ -67,4 +67,4 @@ public:
template <class, class T>
using ExpandToType = T;
} // namespace mbgl
} // namespace mln

View File

@@ -63,13 +63,13 @@ constexpr const char* tracyConstMemoryLabel = "Constant Buffer Memory";
// TracyOpenGL.hpp assumes OpenGL functions are in the global namespace
// Temporarily expose the functions to TracyOpenGL.hpp then undef
#define glGenQueries mbgl::gl::extension::glGenQueries
#define glGetQueryiv mbgl::gl::extension::glGetQueryiv
#define glGetQueryObjectiv mbgl::gl::extension::glGetQueryObjectiv
#define glGetInteger64v mbgl::gl::extension::glGetInteger64v
#define glQueryCounter mbgl::gl::extension::glQueryCounter
#define glGetQueryObjectui64v mbgl::gl::extension::glGetQueryObjectui64v
#define GLint mbgl::platform::GLint
#define glGenQueries mln::gl::extension::glGenQueries
#define glGetQueryiv mln::gl::extension::glGetQueryiv
#define glGetQueryObjectiv mln::gl::extension::glGetQueryObjectiv
#define glGetInteger64v mln::gl::extension::glGetInteger64v
#define glQueryCounter mln::gl::extension::glQueryCounter
#define glGetQueryObjectui64v mln::gl::extension::glGetQueryObjectui64v
#define GLint mln::platform::GLint
#include "tracy/TracyOpenGL.hpp"
@@ -131,6 +131,6 @@ constexpr const char* tracyConstMemoryLabel = "Constant Buffer Memory";
#endif // MLN_TRACY_ENABLE
namespace mbgl::instrumentation {
namespace mln::instrumentation {
void setThreadName(const std::string& name);
};

View File

@@ -16,7 +16,7 @@
#include <type_traits>
#include <utility>
namespace mbgl {
namespace mln {
namespace util {
float interpolationFactor(float base, Range<float> range, float z) noexcept;
@@ -222,4 +222,4 @@ struct Interpolatable
: std::conditional_t<!std::is_base_of_v<Uninterpolated, Interpolator<T>>, std::true_type, std::false_type> {};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <string>
#include <optional>
namespace mbgl {
namespace mln {
class Log {
public:
@@ -91,4 +91,4 @@ private:
const std::unique_ptr<Impl> impl;
};
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <stdexcept>
#include <unordered_map>
namespace mbgl {
namespace mln {
// Simple non-thread-safe LRU cache
template <typename Item, typename Hash = std::hash<Item>>
@@ -57,4 +57,4 @@ private:
std::unordered_map<Item, typename std::list<Item>::iterator, Hash> map;
};
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <chrono>
#include <utility>
namespace mbgl {
namespace mln {
namespace util {
class MonotonicTimer {
@@ -19,4 +19,4 @@ public:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -1,6 +1,6 @@
#pragma once
namespace mbgl {
namespace mln {
namespace util {
namespace non_copyable_ {
@@ -19,4 +19,4 @@ protected:
using noncopyable = non_copyable_::noncopyable;
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <array>
#include <span>
namespace mbgl {
namespace mln {
// A set of four numbers representing padding around a box.
struct Padding {
@@ -62,11 +62,11 @@ struct Padding {
std::array<float, 4> toArray() const;
// Used by ValueFactory<Padding>::make()
mbgl::Value serialize() const;
mln::Value serialize() const;
};
inline Padding operator*(const Padding& padding, float scale) {
return {padding.top * scale, padding.right * scale, padding.bottom * scale, padding.left * scale};
}
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <string>
namespace mbgl {
namespace mln {
namespace platform {
class Request;
@@ -27,4 +27,4 @@ void makeThreadLowPriority();
void setCurrentThreadPriority(double priority);
} // namespace platform
} // namespace mbgl
} // namespace mln

View File

@@ -2,11 +2,11 @@
#include <mbgl/util/image.hpp>
namespace mbgl {
namespace mln {
namespace util {
PremultipliedImage premultiply(UnassociatedImage&&);
UnassociatedImage unpremultiply(PremultipliedImage&&);
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <numbers>
namespace mbgl {
namespace mln {
class ProjectedMeters {
private:
@@ -100,4 +100,4 @@ private:
}
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#pragma once
namespace mbgl {
namespace mln {
template <class T>
class Range {
@@ -25,4 +25,4 @@ constexpr bool operator!=(const Range<T>& a, const Range<T>& b) {
return !(a == b);
}
} // namespace mbgl
} // namespace mln

View File

@@ -1,6 +1,6 @@
#pragma once
namespace mbgl {
namespace mln {
template <typename T>
struct Rect {
@@ -25,4 +25,4 @@ struct Rect {
bool hasArea() const { return w != 0 && h != 0; }
};
} // namespace mbgl
} // namespace mln

View File

@@ -12,7 +12,7 @@
#include <queue>
#include <utility>
namespace mbgl {
namespace mln {
namespace util {
using LOOP_HANDLE = void*;
@@ -147,6 +147,6 @@ private:
};
} // namespace util
} // namespace mbgl
} // namespace mln
#include <mbgl/util/work_task_impl.hpp>

View File

@@ -1,6 +1,6 @@
#pragma once
namespace mbgl {
namespace mln {
/// Run a lambda on scope exit
template <typename Func>
@@ -18,4 +18,4 @@ private:
Func cb;
};
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <cstdint>
namespace mbgl {
namespace mln {
class Size {
public:
@@ -30,4 +30,4 @@ constexpr bool operator!=(const Size& a, const Size& b) noexcept {
return !(a == b);
}
} // namespace mbgl
} // namespace mln

View File

@@ -25,7 +25,7 @@ inline float stof(const std::string &str) {
#endif
namespace mbgl {
namespace mln {
namespace util {
std::string toString(int64_t);
@@ -97,7 +97,7 @@ inline float stof(const std::string &str) {
}
} // namespace util
} // namespace mbgl
} // namespace mln
// Android's libstdc++ doesn't have std::to_string()
#if defined(__ANDROID__) && defined(__GLIBCXX__)
@@ -106,7 +106,7 @@ namespace std {
template <typename T>
inline std::string to_string(T value) {
return mbgl::util::toString(value);
return mln::util::toString(value);
}
} // namespace std

View File

@@ -9,7 +9,7 @@
#include <mutex>
#include <shared_mutex>
namespace mbgl {
namespace mln {
using StringIdentity = std::size_t;
@@ -42,4 +42,4 @@ protected:
/// StringIndexer singleton
StringIndexer& stringIndexer();
} // namespace mbgl
} // namespace mln

View File

@@ -1,6 +1,6 @@
#pragma once
namespace mbgl {
namespace mln {
namespace util {
/// Wrapper that doesn't participate in copying.
@@ -31,4 +31,4 @@ private:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -2,7 +2,7 @@
#include <string>
namespace mbgl {
namespace mln {
/// Receives errors detected by the symbol guard checks (see `MLN_SYMBOL_GUARDS`).
/// Both `TileObserver` and `RendererObserver` derive from this, so that whichever of them owns
@@ -16,4 +16,4 @@ public:
virtual void onSymbolError(const std::string&) {}
};
} // namespace mbgl
} // namespace mln

View File

@@ -16,7 +16,7 @@
#include <thread>
#include <utility>
namespace mbgl {
namespace mln {
namespace util {
/// @brief Manages a thread with `Object`.
@@ -165,4 +165,4 @@ private:
std::function<void()> makeThreadPrioritySetter(std::string threadType);
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -7,7 +7,7 @@
#include <string>
#include <vector>
namespace mbgl {
namespace mln {
/**
* @brief Holds values for tile server options.
@@ -254,7 +254,7 @@ public:
/**
* @brief Gets the default styles.
*/
const std::vector<mbgl::util::DefaultStyle> defaultStyles() const;
const std::vector<mln::util::DefaultStyle> defaultStyles() const;
/**
* @brief Sets the collection default styles.
@@ -262,7 +262,7 @@ public:
* @param styles The style set.
* @return TileServerOptions for chaining options together.
*/
TileServerOptions& withDefaultStyles(std::vector<mbgl::util::DefaultStyle> styles);
TileServerOptions& withDefaultStyles(std::vector<mln::util::DefaultStyle> styles);
/**
* @brief Sets the default style by name. The style name must exist in
@@ -303,4 +303,4 @@ private:
std::unique_ptr<Impl> impl_;
};
} // namespace mbgl
} // namespace mln

View File

@@ -10,7 +10,7 @@
#include <cstdint>
#include <optional>
namespace mbgl {
namespace mln {
class Tileset {
public:
@@ -54,4 +54,4 @@ public:
bool operator!=(const Tileset&) const = default;
};
} // namespace mbgl
} // namespace mln

View File

@@ -6,7 +6,7 @@
#include <memory>
#include <functional>
namespace mbgl {
namespace mln {
namespace util {
class Timer : private util::noncopyable {
@@ -23,4 +23,4 @@ private:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <optional>
#include <unordered_map>
namespace mbgl {
namespace mln {
namespace util {
/// A wrapper around `unordered_map` which uses linear search below some threshold of size.
@@ -210,4 +210,4 @@ private:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -5,7 +5,7 @@
#include <type_traits>
#include <vector>
namespace mbgl {
namespace mln {
template <typename T>
constexpr auto underlying_type(T t) -> typename std::underlying_type_t<T> {
@@ -42,4 +42,4 @@ struct is_linear_container<std::array<T, N>> : std::true_type {};
template <typename... Ts>
struct is_linear_container<std::vector<Ts...>> : std::true_type {};
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <type_traits>
#include <tuple>
namespace mbgl {
namespace mln {
template <class... Ts>
struct TypeList {
@@ -62,4 +62,4 @@ using FilteredTypeList = typename detail::TypeFilter<TypeList, Predicate>::Type;
template <class... Ts>
using TypeListConcat = typename detail::TypeListConcat<Ts...>::Type;
} // namespace mbgl
} // namespace mln

View File

@@ -28,7 +28,7 @@
#include <cmath>
#include <tuple>
namespace mbgl {
namespace mln {
namespace util {
struct UnitBezier {
@@ -116,4 +116,4 @@ private:
};
} // namespace util
} // namespace mbgl
} // namespace mln

View File

@@ -11,7 +11,7 @@
#pragma warning(pop)
#endif
namespace mbgl {
namespace mln {
template <typename... T>
using variant = mapbox::util::variant<T...>;
@@ -25,4 +25,4 @@ struct overloaded : Ts... {
template <class... Ts>
overloaded(Ts...) -> overloaded<Ts...>;
} // namespace mbgl
} // namespace mln

View File

@@ -3,7 +3,7 @@
#include <array>
#include <algorithm>
namespace mbgl {
namespace mln {
using vec2 = std::array<double, 2>;
using vec3 = std::array<double, 3>;
@@ -21,4 +21,4 @@ auto concatenate(const std::array<Type, sizes>&... arrays) {
return result;
}
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <memory>
namespace mbgl {
namespace mln {
class WorkTask;
@@ -18,4 +18,4 @@ private:
std::shared_ptr<WorkTask> task;
};
} // namespace mbgl
} // namespace mln

View File

@@ -4,7 +4,7 @@
#include <memory>
namespace mbgl {
namespace mln {
/// A movable type-erasing function wrapper. This allows to store arbitrary
/// invocable things (like std::function<>, or the result of a movable-only
@@ -21,4 +21,4 @@ public:
static std::shared_ptr<WorkTask> make(Fn&&, Args&&...);
};
} // namespace mbgl
} // namespace mln

View File

@@ -8,7 +8,7 @@
#include <type_traits>
#include <utility>
namespace mbgl {
namespace mln {
template <class F, class P>
class WorkTaskImpl : public WorkTask {
@@ -62,4 +62,4 @@ std::shared_ptr<WorkTask> WorkTask::make(Fn&& fn, Args&&... args) {
std::forward<Fn>(fn), std::move(tuple), flag);
}
} // namespace mbgl
} // namespace mln