When using clang's libc++, the 'using namespace std;' in CLucene's
StdHeader.h causes ambiguity between wcschr() from wchar.h and
std::wcschr() from cwchar (which is automatically included by libc++).
The only symbols used from the std namespace are std::min() and
std::max() so only pull these in, not the whole std namespace.
Change-Id: I5700f6a221ee0667d4a3bb85110f6fea17a121bf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
//use std namespace
#ifndef LUCENE_NO_STDC_NAMESPACE
+#ifdef _LIBCPP_VERSION
+// clang's libc++ pulls in cwchar, clucene pulls in wchar.h and the entire std
+// namespace which causes ambiguity between ::wcschar() and std::wcschar(), but
+// clucene is only using std::min() and std::max()
+using std::min;
+using std::max;
+#else
using namespace std;
#endif
+#endif
////////////////////////////////////////////////////////