Bump version to 24.04.3.4
[LibreOffice.git] / external / boost / boost.noiconv.patch
blob02f206375a4ae6afa4633042c35715f62fa69a6a
1 diff -ru boost.orig/boost/libs/locale/src/encoding/codepage.cpp boost/boost/libs/locale/src/encoding/codepage.cpp
2 --- foo/misc/boost.orig/libs/locale/src/encoding/codepage.cpp
3 +++ foo/misc/boost/libs/locale/src/boost/locale/encoding/codepage.cpp
4 @@ -39,6 +39,7 @@
5 const char* from_charset,
6 method_type how)
8 +#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
9 hold_ptr<converter_between> cvt;
10 #ifdef BOOST_LOCALE_WITH_ICONV
11 cvt.reset(new iconv_between());
12 @@ -55,6 +56,7 @@
13 if(cvt->open(to_charset, from_charset, how))
14 return cvt->convert(begin, end);
15 #endif
16 +#endif
17 throw invalid_charset_error(std::string(to_charset) + " or " + from_charset);
20 @@ -65,6 +67,7 @@
21 template<typename CharType>
22 std::basic_string<CharType> convert_to(const char* begin, const char* end, const char* charset, method_type how)
24 +#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
25 hold_ptr<converter_to_utf<CharType>> cvt;
26 #ifdef BOOST_LOCALE_WITH_ICONV
27 cvt.reset(new iconv_to_utf<CharType>());
28 @@ -81,6 +84,7 @@
29 if(cvt->open(charset, how))
30 return cvt->convert(begin, end);
31 #endif
32 +#endif
33 throw invalid_charset_error(charset);
36 @@ -91,6 +95,7 @@
37 template<typename CharType>
38 std::string convert_from(const CharType* begin, const CharType* end, const char* charset, method_type how)
40 +#if defined(BOOST_LOCALE_WITH_ICONV) || defined(BOOST_LOCALE_WITH_ICU) || defined(BOOST_LOCALE_WITH_WCONV)
41 hold_ptr<converter_from_utf<CharType>> cvt;
42 #ifdef BOOST_LOCALE_WITH_ICONV
43 cvt.reset(new iconv_from_utf<CharType>());
44 @@ -107,6 +112,7 @@
45 if(cvt->open(charset, how))
46 return cvt->convert(begin, end);
47 #endif
48 +#endif
49 throw invalid_charset_error(charset);