10 #ifndef INCLUDED_RTL_STRINGUTILS_HXX 11 #define INCLUDED_RTL_STRINGUTILS_HXX 25 #ifdef RTL_STRING_UNITTEST 26 #define rtl rtlunittest 32 #ifdef RTL_STRING_UNITTEST 36 #if defined LIBO_INTERNAL_ONLY 75 constexpr OUStringLiteral1_(
sal_Unicode theC): c(theC) {}
78 #if defined _MSC_VER && _MSC_VER <= 1900 && !defined __clang__ 80 using OUStringLiteral1 = OUStringLiteral1_;
81 #pragma warning(disable: 4239) 83 using OUStringLiteral1 = OUStringLiteral1_
const;
89 namespace libreoffice_internal
116 template<
typename T1,
typename T2 =
void >
119 static const bool ok =
false;
121 template<
typename T >
125 static const bool ok =
true;
127 template<
typename T >
131 static const bool ok =
true;
134 template<
typename T1,
typename T2 >
138 template<
typename T,
int N >
143 #ifdef RTL_STRING_UNITTEST 145 template<
typename T >
150 template<
typename T >
157 template<
typename T1,
typename T2 =
void >
160 static const bool ok =
false;
162 template< std::
size_t N,
typename T >
166 static const std::size_t length = N - 1;
167 static const bool ok =
true;
168 static bool isValid(
char const (& literal)[N])
169 {
return std::strlen(literal) == length; }
170 static char const *
toPointer(
char const (& literal)[N]) {
return literal; }
172 #if defined LIBO_INTERNAL_ONLY 173 template<std::
size_t N,
typename T>
176 static constexpr
bool const ok =
true;
177 static constexpr std::size_t
const length = N - 1;
178 static constexpr sal_Unicode
const * toPointer(
179 sal_Unicode
const (& literal)[N])
183 #if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 8 \
184 && !defined __clang__
185 OUStringLiteral1_
const,
192 static constexpr
bool const ok =
true;
193 static constexpr std::size_t
const length = 1;
194 static constexpr sal_Unicode
const * toPointer(
195 OUStringLiteral1_
const & literal)
196 {
return &literal.c; }
201 template<
typename T >
210 #if defined LIBO_INTERNAL_ONLY 211 template<std::
size_t N>
214 #if defined __GNUC__ && __GNUC__ == 4 && __GNUC_MINOR__ <= 8 \
215 && !defined __clang__
216 OUStringLiteral1_
const 228 template<
typename T >
241 #if defined LIBO_INTERNAL_ONLY 247 template<
typename T1,
typename T2 =
void >
250 static const bool ok =
false;
252 template<
typename T >
256 static const bool ok =
true;
258 template<
typename T >
262 static const bool ok =
true;
266 template<
typename T,
bool >
271 template<
typename T >
282 #endif // INCLUDED_RTL_STRINGUTILS_HXX Definition: stringutils.hxx:158
static char const * toPointer(char const (&literal)[N])
Definition: stringutils.hxx:170
Definition: stringutils.hxx:202
T Type
Definition: stringutils.hxx:141
Definition: stringutils.hxx:267
Definition: stringutils.hxx:248
Definition: stringutils.hxx:229
T Type
Definition: stringutils.hxx:130
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:606
Definition: stringutils.hxx:135
Definition: stringutils.hxx:117
sal_uInt16 sal_Unicode
Definition: types.h:142
T Type
Definition: stringutils.hxx:261
static bool isValid(char const (&literal)[N])
Definition: stringutils.hxx:168
Definition: stringutils.hxx:115
T Type
Definition: stringutils.hxx:274
Dummy Type
Definition: stringutils.hxx:204
Definition: bootstrap.hxx:29
Dummy Type
Definition: stringutils.hxx:231
T Type
Definition: stringutils.hxx:255
T Type
Definition: stringutils.hxx:124
T Type
Definition: stringutils.hxx:165