Mercurial > octave
changeset 21327:fd4ff31b3eed
build: Fix C++11 compliance detection to work with clang
* prog_cxx.m4 (OCTAVE_CXX_CXX11_TEST_BODY): Const-qualify Unicode string
initializations to work with stricter compilers (e.g. clang).
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Tue, 23 Feb 2016 16:48:04 -0800 |
parents | 9a49c83cb360 |
children | 0705248d47bf |
files | m4/prog_cxx.m4 |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/m4/prog_cxx.m4 Tue Feb 23 16:34:23 2016 -0800 +++ b/m4/prog_cxx.m4 Tue Feb 23 16:48:04 2016 -0800 @@ -318,9 +318,12 @@ std::vector<std::pair<int,char*>> v1; } { +dnl FIXME: Octave-specific change, this feature test is modified from the +dnl original Autoconf source. The "const" type qualifier is strictly required, +dnl needed for this test to pass with clang for example. // Unicode literals - char *utf8 = u8"UTF-8 string \u2500"; - char16_t *utf16 = u"UTF-8 string \u2500"; - char32_t *utf32 = U"UTF-32 string \u2500"; + const char *utf8 = u8"UTF-8 string \u2500"; + const char16_t *utf16 = u"UTF-8 string \u2500"; + const char32_t *utf32 = U"UTF-32 string \u2500"; } ]])