Update Boost to 1.83, replace Boost Locale with deprecated codecvt STL (#1660)
Co-authored-by: mwilsnd <mwilsnd@gmail.com>
This commit is contained in:
@@ -74,7 +74,7 @@ protected:
|
||||
friend class BackendScope;
|
||||
};
|
||||
|
||||
MBGL_CONSTEXPR bool operator==(const RendererBackend& a, const RendererBackend& b) {
|
||||
constexpr bool operator==(const RendererBackend& a, const RendererBackend& b) {
|
||||
return &a == &b;
|
||||
}
|
||||
|
||||
|
||||
@@ -45,23 +45,23 @@ enum class MapDebugOptions : EnumType {
|
||||
DepthBuffer = 1 << 7,
|
||||
};
|
||||
|
||||
MBGL_CONSTEXPR MapDebugOptions operator|(MapDebugOptions lhs, MapDebugOptions rhs) {
|
||||
constexpr MapDebugOptions operator|(MapDebugOptions lhs, MapDebugOptions rhs) {
|
||||
return MapDebugOptions(mbgl::underlying_type(lhs) | mbgl::underlying_type(rhs));
|
||||
}
|
||||
|
||||
MBGL_CONSTEXPR MapDebugOptions& operator|=(MapDebugOptions& lhs, MapDebugOptions rhs) {
|
||||
constexpr MapDebugOptions& operator|=(MapDebugOptions& lhs, MapDebugOptions rhs) {
|
||||
return (lhs = MapDebugOptions(mbgl::underlying_type(lhs) | mbgl::underlying_type(rhs)));
|
||||
}
|
||||
|
||||
MBGL_CONSTEXPR bool operator&(MapDebugOptions lhs, MapDebugOptions rhs) {
|
||||
constexpr bool operator&(MapDebugOptions lhs, MapDebugOptions rhs) {
|
||||
return mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs);
|
||||
}
|
||||
|
||||
MBGL_CONSTEXPR MapDebugOptions& operator&=(MapDebugOptions& lhs, MapDebugOptions rhs) {
|
||||
constexpr MapDebugOptions& operator&=(MapDebugOptions& lhs, MapDebugOptions rhs) {
|
||||
return (lhs = MapDebugOptions(mbgl::underlying_type(lhs) & mbgl::underlying_type(rhs)));
|
||||
}
|
||||
|
||||
MBGL_CONSTEXPR MapDebugOptions operator~(MapDebugOptions value) {
|
||||
constexpr MapDebugOptions operator~(MapDebugOptions value) {
|
||||
return MapDebugOptions(~mbgl::underlying_type(value));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,25 +6,25 @@
|
||||
namespace mbgl {
|
||||
|
||||
template <typename Enum>
|
||||
MBGL_CONSTEXPR Enum operator|(Enum a, Enum b) {
|
||||
constexpr Enum operator|(Enum a, Enum b) {
|
||||
static_assert(std::is_enum<Enum>::value, "Enum must be an enum type");
|
||||
return Enum(mbgl::underlying_type(a) | mbgl::underlying_type(b));
|
||||
}
|
||||
|
||||
template <typename Enum>
|
||||
MBGL_CONSTEXPR Enum& operator|=(Enum& a, Enum b) {
|
||||
constexpr Enum& operator|=(Enum& a, Enum b) {
|
||||
static_assert(std::is_enum<Enum>::value, "Enum must be an enum type");
|
||||
return (a = a | b);
|
||||
}
|
||||
|
||||
template <typename Enum>
|
||||
MBGL_CONSTEXPR bool operator&(Enum a, Enum b) {
|
||||
constexpr bool operator&(Enum a, Enum b) {
|
||||
static_assert(std::is_enum<Enum>::value, "Enum must be an enum type");
|
||||
return bool(mbgl::underlying_type(a) & mbgl::underlying_type(b));
|
||||
}
|
||||
|
||||
template <typename Enum>
|
||||
MBGL_CONSTEXPR Enum operator~(Enum value) {
|
||||
constexpr Enum operator~(Enum value) {
|
||||
static_assert(std::is_enum<Enum>::value, "Enum must be an enum type");
|
||||
return Enum(~mbgl::underlying_type(value));
|
||||
}
|
||||
|
||||
@@ -11,14 +11,14 @@ namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
template <typename To, typename From, std::size_t Size, typename = std::enable_if_t<std::is_convertible_v<From, To>>>
|
||||
MBGL_CONSTEXPR std::array<To, Size> convert(const std::array<From, Size>& from) {
|
||||
constexpr std::array<To, Size> convert(const std::array<From, Size>& from) {
|
||||
std::array<To, Size> to{{}};
|
||||
std::copy(std::begin(from), std::end(from), std::begin(to));
|
||||
return to;
|
||||
}
|
||||
|
||||
template <typename To, typename From, std::size_t Size, typename = std::enable_if_t<std::is_assignable_v<To&, From>>>
|
||||
MBGL_CONSTEXPR std::array<To, Size> cast(const std::array<From, Size>& from) {
|
||||
constexpr std::array<To, Size> cast(const std::array<From, Size>& from) {
|
||||
std::array<To, Size> to{{}};
|
||||
std::transform(std::begin(from), std::end(from), std::begin(to), [](From x) { return static_cast<To>(x); });
|
||||
return to;
|
||||
|
||||
@@ -13,13 +13,6 @@
|
||||
|
||||
#endif
|
||||
|
||||
// GCC 4.9 compatibility
|
||||
#if !defined(__GNUC__) || __GNUC__ >= 5
|
||||
#define MBGL_CONSTEXPR constexpr
|
||||
#else
|
||||
#define MBGL_CONSTEXPR inline
|
||||
#endif
|
||||
|
||||
// Compiler defines for making symbols visible, otherwise they
|
||||
// will be defined as hidden by default.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user