I'm going to merge this into v4.0 in order to fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216772
/Eric On Sat, Feb 4, 2017 at 1:27 PM, Eric Fiselier via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: ericwf > Date: Sat Feb 4 14:27:46 2017 > New Revision: 294099 > > URL: http://llvm.org/viewvc/llvm-project?rev=294099&view=rev > Log: > Undefine min/max in __tree > > Added: > libcxx/trunk/test/libcxx/containers/associative/undef_min_max.pass.cpp > Modified: > libcxx/trunk/include/__tree > > Modified: libcxx/trunk/include/__tree > URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/_ > _tree?rev=294099&r1=294098&r2=294099&view=diff > ============================================================ > ================== > --- libcxx/trunk/include/__tree (original) > +++ libcxx/trunk/include/__tree Sat Feb 4 14:27:46 2017 > @@ -17,6 +17,8 @@ > #include <stdexcept> > #include <algorithm> > > +#include <__undef_min_max> > + > #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) > #pragma GCC system_header > #endif > > Added: libcxx/trunk/test/libcxx/containers/associative/undef_ > min_max.pass.cpp > URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/ > libcxx/containers/associative/undef_min_max.pass.cpp?rev=294099&view=auto > ============================================================ > ================== > --- libcxx/trunk/test/libcxx/containers/associative/undef_min_max.pass.cpp > (added) > +++ libcxx/trunk/test/libcxx/containers/associative/undef_min_max.pass.cpp > Sat Feb 4 14:27:46 2017 > @@ -0,0 +1,22 @@ > +//===------------------------------------------------------ > ----------------===// > +// > +// The LLVM Compiler Infrastructure > +// > +// This file is dual licensed under the MIT and the University of > Illinois Open > +// Source Licenses. See LICENSE.TXT for details. > +// > +//===------------------------------------------------------ > ----------------===// > + > +#if defined(__GNUC__) > +#pragma GCC diagnostic ignored "-W#warnings" > +#endif > + > +#define min THIS IS A NASTY MACRO! > +#define max THIS IS A NASTY MACRO! > + > +#include <map> > + > +int main() { > + std::map<int, int> m; > + ((void)m); > +} > > > _______________________________________________ > cfe-commits mailing list > cfe-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits