This change caused problems when building code like povray that:
a) uses 'using namespace std;'
b) is built on an environment where the C library provides the "wrong"
(non-const-correct) interface for the str* functions
c) makes an unqualified call to one of those str* functions
A patch is out for review to add a facility to fix this (and to give the
correct signatures for these functions whenever possible, even when the C
library does not do so). This revert is expected to be temporary.
llvm-svn: 251665
C++ macros and CMake options that specify the default ABI version of
the library, and can be overridden to pick up new ABI-changing
features.
llvm-svn: 250254
Previously, this resulted in us declaring a template for static_assert emulation within the 'extern "C"' context, which is ill-formed.
llvm-svn: 250247
Summary:
Hi all,
This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread.
Please read the design documentation added in this patch for a description of how it works.
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits
Differential Revision: http://reviews.llvm.org/D13407
llvm-svn: 250235
Also fix the overload set for the five functions whose signatures change in the
case where we can fix it. This is already covered by existing tests for the
affected systems.
llvm-svn: 249929
There are a bunch of macros (__need_size_t etc) that request just one piece of
<stddef.h>; if any one of these is defined, we just directly include the
underlying header.
Note that <stddef.h> provides a ::nullptr_t. We don't want that available to
includers of <cstddef>, so instead of following the usual pattern where <cfoo>
includes <foo.h> then pulls things from :: into std:: with using-declarations,
we implement <stddef.h> and <cstddef> separately; both include <__nullptr> for
the definition of std::nullptr_t.
llvm-svn: 249761
The C standard requires that these be provided as functions even if they're
also provided as macros, and a strict reading of the C++ standard library rules
suggests that (for instance) &::isdigit == &::std::isdigit, so these wrappers
are technically non-conforming.
llvm-svn: 249475
Summary:
Hi Marshall,
Could you please test this patch and see if you run into the same linker errors we talked about?
I can't reproduce on linux or OS X.
Hopefully you can't find any problems and we can fix the C++03 bot.
Reviewers: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D13337
llvm-svn: 249192
Summary:
This patch properly constrains the converting assignment operator in C++03. It also fixes a bug where std::forward was given the wrong type.
The following two tests begin passing in C++03:
* `unique_ptr.single.asgn/move_convert.pass.cpp`
* `unique_ptr.single.asgn/move_convert13.fail.cpp`
Reviewers: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D12173
llvm-svn: 246272
Summary:
This patch optimizes basic_string::compare to use strcmp when the default char_traits has been given.
See PR19900 for more information. https://llvm.org/bugs/show_bug.cgi?id=19900
Reviewers: mclow.lists
Subscribers: bkramer, cfe-commits
Differential Revision: http://reviews.llvm.org/D12355
llvm-svn: 246266