From 90eaa1bbe32bd84e309d75f1abde06d42a6e73ed Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 15 Jul 2016 02:12:55 +0200 Subject: [PATCH] Compilation fix for libc++ after the previous commit libc++ defines std::iter_swap() with a non-standard exception specification incompatible with the other other standard libraries and not compiling with our definition of swap() for wxUniCharRef anyhow, so disable iter_swap() specialization until https://llvm.org/bugs/show_bug.cgi?id=28559 is fixed. --- include/wx/string.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/wx/string.h b/include/wx/string.h index 9e1db371be..0f702d7ccb 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -3991,7 +3991,10 @@ namespace std // iterator::reference being different from "iterator::value_type&", in C++11 // iter_swap() just calls swap() by default and this doesn't work for us as // wxUniCharRef is not the same as "wxUniChar&". -#if __cplusplus >= 201103L +// +// Unfortunately currently iter_swap() can't be specialized when using libc++, +// see https://llvm.org/bugs/show_bug.cgi?id=28559 +#if (__cplusplus >= 201103L) && !defined(_LIBCPP_VERSION) namespace std {