diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-08-27 21:27:38 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-08-29 11:44:19 +0000 |
commit | 0c8fa58a2d73702770687ed15b98822d09f96ac3 (patch) | |
tree | f821dbc05e76a2430d902aec672cbb828d18d525 /configure.ac | |
parent | c399004b42ae3694e13730712854556b6293763e (diff) |
Support ConstCharArrayDetector also for UTF-16 arrays
The long-term benefit will be support of C++11 char16_t string literals (for
cases of string literals with non-ASCII content) once we drop any compilers that
don't support those yet. The short-term benefit is support for an improved
OUStringLiteral1 that accepts any sal_Unicode value, not just ASCII ones (see
next commit).
Change-Id: I3f8f6697d7eb62b5176b7e812b5a5113c53b83a4
Reviewed-on: https://gerrit.libreoffice.org/28445
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0cf2dba4cb09..6b2808354e14 100644 --- a/configure.ac +++ b/configure.ac @@ -6390,6 +6390,20 @@ if test "$cxx11_ref_qualifier" = yes; then AC_DEFINE([HAVE_CXX11_REF_QUALIFIER]) fi +AC_MSG_CHECKING([whether $CXX supports C++11 char16_t string literals]) +save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11" +AC_LANG_PUSH([C++]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + auto s = u""; + ]])], [cxx11_utf16_string_literal=yes], [cxx11_utf16_string_literal=no]) +AC_LANG_POP([C++]) +CXXFLAGS=$save_CXXFLAGS +AC_MSG_RESULT([$cxx11_utf16_string_literal]) +if test "$cxx11_utf16_string_literal" = yes; then + AC_DEFINE([HAVE_CXX11_UTF16_STRING_LITERAL]) +fi + AC_MSG_CHECKING([whether $CXX supports C++14 sized deallocation]) dnl At least Clang -fsanitize=address causes "multiple definition of dnl `operator delete(void*, unsigned long)'" also defined in |