git.iko.soy/typeable/libphonenumber
on main help sign in
Revert "Support libphonenumber 7.1.0"

This reverts commit dad2ec7d7ac7343e2da8df53bb232244516cb9f0.

commitd2b0e740632def252afedb5c925f641725b92dbb authormniip <mniip@mniip.com> dateTue 4 Apr 2023, 09:29 (4 years ago) parentdad2ec7
3 files changed+3−21
cxxbits/c_phonenumber.cpp+1−13 include/common.h−7 libphonenumber.cabal+2−1
cxxbits/c_phonenumber.cpp+1−13
@@ -9,18 +9,6 @@ extern "C" {
99
1010using i18n::phonenumbers::PhoneNumber;
1111
12−// libphonenumber versions < 8.6.0 do not define CountryCodeSource::UNSPECIFIED
13−// The value PN_UNSPECIFIED contains CountryCodeSource::UNSPECIFIED if it is
14−// defined, otherwise 0 (the value used in the newer versions).
15−template<typename T, typename = void>
16−struct check_UNSPECIFIED: std::integral_constant<T, static_cast<T>(0)>
17−{};
18−template<typename T>
19−struct check_UNSPECIFIED<T, void_t<decltype(T::UNSPECIFIED)>>:
20− std::integral_constant<T, T::UNSPECIFIED>
21−{};
22−static constexpr auto PN_UNSPECIFIED = check_UNSPECIFIED<PhoneNumber::CountryCodeSource>::value;
23−
2412static PhoneNumber::CountryCodeSource marshal_country_code_source(country_code_source value)
2513{
2614 static_assert(is_same_enum<
@@ -32,7 +20,7 @@ static PhoneNumber::CountryCodeSource marshal_country_code_source(country_code_s
3220 FROM_DEFAULT_COUNTRY
3321 >,
3422 enum_values<PhoneNumber::CountryCodeSource,
35− PN_UNSPECIFIED,
23+ PhoneNumber::UNSPECIFIED,
3624 PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN,
3725 PhoneNumber::FROM_NUMBER_WITH_IDD,
3826 PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN,
include/common.h−7
@@ -50,13 +50,6 @@ struct is_same_enum<enum_values<T, TVals...>, enum_values<S, SVals...>>:
5050 >::value>
5151{};
5252
53−// std::void_t for compilers that don't have it
54−template<typename T>
55−struct make_void { using type = void; };
56−
57−template<typename T>
58−using void_t = typename make_void<T>::type;
59−
6053inline void unmarshal_string_size(std::string const &string, char *&c_string, size_t &c_string_size)
6154{
6255 c_string_size = string.size();
libphonenumber.cabal+2−1
@@ -8,7 +8,8 @@ description:
88 This package provides bindings for the C++ version of the
99 <https://github.com/google/libphonenumber libphonenumber library>.
1010 The bindings currently do not include @AsYouTypeFormatter@
11− and @ShortNumberInfo@.
11+ and @ShortNumberInfo@. The C++ library must be of version
12+ >= 8.7.0.
1213
1314 The interface largely resembles that of the original unified
1415 C++, Java, and JavaScript version of the library, with some