Howard Hinnant
41801f14ed
This SO question: http://stackoverflow.com/questions/15344402/how-can-i-read-a-0xff-in-a-file-with-libc-istream-iterator/15347225#15347225 highlighted the lack of a cast in the implementation of std::cin. Added. I unfortunately don't have a test case to add to the suite since this bug only shows itself when using std::cin. The current testsuite setup does not have a way a good way to test std::cin.
...
llvm-svn: 176822
2013-03-11 19:53:48 +00:00
Howard Hinnant
7e4844b353
Parsing floating point numbers with very long precision was broken, and this patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445 .
...
llvm-svn: 176711
2013-03-08 19:06:24 +00:00
Howard Hinnant
c60bf548c5
Albert Wong: definition for regex_traits<_CharT>::__regex_word.
...
llvm-svn: 176640
2013-03-07 19:38:08 +00:00
Howard Hinnant
ead480d30a
Change _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__(default) when available. This change makes just the type_info visible so that types like vectors and strings can be used as exception objects across dylib boundaries even when hidden visibility is specified globally (at the command line), and yet this allows clients to hide the member functions of things like vector and string (with global visibility commands).
...
llvm-svn: 176639
2013-03-07 19:25:03 +00:00
Howard Hinnant
6e41256f68
No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
...
llvm-svn: 176593
2013-03-06 23:30:19 +00:00
Howard Hinnant
65f58f3fe8
Have basic_istream::read call sgetn intead of sbumpc individual characters. This addresses http://llvm.org/bugs/show_bug.cgi?id=15427 .
...
llvm-svn: 176573
2013-03-06 19:27:56 +00:00
Howard Hinnant
3fb6c6e50d
Correct silly type-o. Thanks Richard.
...
llvm-svn: 176568
2013-03-06 18:16:12 +00:00
Howard Hinnant
53b9ee061f
The bitset(unsigned long long) constructor was broken by the constexpr additions only on 32 bit platforms. Fixed. This addresses http://llvm.org/bugs/show_bug.cgi?id=15444 .
...
llvm-svn: 176559
2013-03-06 17:30:26 +00:00
Howard Hinnant
a9f698009f
Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.
...
llvm-svn: 176026
2013-02-25 15:50:36 +00:00
Howard Hinnant
c0c9748c11
Constrain bind operator()() to not exist if the call is not valid. Fixes http://llvm.org/bugs/show_bug.cgi?id=15295 .
...
llvm-svn: 175774
2013-02-21 18:16:55 +00:00
Marshall Clow
b6e5f854f5
Change the 'result_type' from unsigned to 'uint_fast32_t'. This eliminates truncation warnings on Linux
...
llvm-svn: 174669
2013-02-07 22:12:02 +00:00
Howard Hinnant
aba500d633
Revert accidental check-in. These changes are probably good, but premature at this point.
...
llvm-svn: 174625
2013-02-07 15:31:44 +00:00
Howard Hinnant
804f9116e5
Michael van der Westhuizen: The attached patch add support for building against libc++abi and libcxxrt to CMake builds of libc++.
...
Usage (with the appropriate CC and CXX environment variables) is:
$ cmake -DLIBCXX_CXX_ABI=libcxxabi '-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=/home/michael/libcxxabi/include' ../libcxx
and:
$ cmake -DLIBCXX_CXX_ABI=libcxxrt '-DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/home/michael/libcxxrt/src' ../libcxx
llvm-svn: 174623
2013-02-07 15:27:39 +00:00
Howard Hinnant
d3d4356f6e
Marcin Zalewski: Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.
...
llvm-svn: 174544
2013-02-06 21:03:39 +00:00
Howard Hinnant
2446649c1e
Saleem Abdulrasool: If errno is defined as volatile int, the qualifier differences can cause
...
template typename deductions on swap<> (used in string.cpp). Use
decltype(errno) to replicate the type and qualifier information for holding the
errno value. Because errno is expected to be assignable, there is no need to
use typename std::remove_const<decltype(errno)>::type to hold the value.
llvm-svn: 173172
2013-01-22 17:26:08 +00:00
Howard Hinnant
ead15d1f95
Implement the ATOMIC_*_LOCK_FREE macros.
...
llvm-svn: 173084
2013-01-21 20:39:41 +00:00
Howard Hinnant
8d3e797444
Donated anonymously: This enables GCC 4.8.0 to build libc++.
...
llvm-svn: 173060
2013-01-21 17:26:55 +00:00
Howard Hinnant
3d7eb2f806
Optimize basic_ostream::write by having it call sputn instead of sputc.
...
llvm-svn: 172542
2013-01-15 17:22:03 +00:00
Howard Hinnant
980e7e7402
Make <cmath> classification macros work with integral types.
...
llvm-svn: 172461
2013-01-14 20:56:22 +00:00
Howard Hinnant
2153d69672
Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934 .
...
llvm-svn: 172456
2013-01-14 20:01:24 +00:00
Howard Hinnant
f1e633c154
Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648 .
...
llvm-svn: 172435
2013-01-14 17:07:27 +00:00
Howard Hinnant
8d9aec8802
Fix exception safety bug in vector::push_back
...
llvm-svn: 172250
2013-01-11 20:36:59 +00:00
Howard Hinnant
114676622f
atomic_bool was missing (just a typedef to atomic<bool>).
...
llvm-svn: 171498
2013-01-04 18:58:50 +00:00
Howard Hinnant
861f006d3f
Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.
...
llvm-svn: 171321
2012-12-31 20:09:48 +00:00
Chandler Carruth
e70a813b59
Don't mark variadic functions as always inline -- they cannot in fact be
...
inlined.
Patch by Saleem Abdulrasool, reviewed by Michael Spencer and Richard Smith.
llvm-svn: 171276
2012-12-31 06:09:54 +00:00
Howard Hinnant
a96d74585f
Remove test for eof from istreambuf_iterator constructors. It is no longer necessary and potentially violates the constructor's noexcept spec.
...
llvm-svn: 171232
2012-12-29 17:45:42 +00:00
Howard Hinnant
3b42bdd58a
Hyeon-Bin Jeong: readsome() need to reset gcount to zero. This fixes http://llvm.org/bugs/show_bug.cgi?id=14670 .
...
llvm-svn: 170703
2012-12-20 15:40:28 +00:00
Richard Smith
e3fbbccc0f
Implement std::is_base_of for the case where we don't have a compiler
...
intrinsic. This relies upon the fact that overload resolution does not check
access and ambiguity for a derived-to-base conversion. This passes all
is_base_of tests in the test suite.
llvm-svn: 170662
2012-12-20 04:20:28 +00:00
Marshall Clow
36a60721ce
Added static_assert to std::get<N>(std::array) calls to catch "out of bounds" calls
...
llvm-svn: 170435
2012-12-18 16:46:30 +00:00
Howard Hinnant
16694b5df5
Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585 .
...
llvm-svn: 170026
2012-12-12 21:14:28 +00:00
Richard Smith
e1f363c724
Remove 'noreturn' attribute from friend declaration. This attribute will be
...
inherited from the previous out-of-class declaration, and attributes on friend
function declarations are ill-formed in C++11.
llvm-svn: 168853
2012-11-29 04:30:50 +00:00
Howard Hinnant
f8b24cf5f7
Dimitry Andric: When using libc++ headers on FreeBSD, in combination with -std=c++98,
...
-ansi or -std=c++03, the long long type is not supported. So in this
case, several functions and types, like lldiv_t, strtoll(), are not
declared.
llvm-svn: 168610
2012-11-26 21:18:17 +00:00
Howard Hinnant
dfdf5085df
istreambuf_iterator increment should call sbumpc instead of snextc. Patch
...
by Kimball Thurston. This fixes http://llvm.org/bugs/show_bug.cgi?id=14358 .
llvm-svn: 168209
2012-11-16 22:17:23 +00:00
Howard Hinnant
b5c63a2e07
Restrict optimized __pad_and_output implementation detail to desired releases.
...
llvm-svn: 167980
2012-11-14 21:17:15 +00:00
Howard Hinnant
119703f984
Dimitry Andric: Silence some miscellaneous warnings.
...
llvm-svn: 167493
2012-11-06 21:55:44 +00:00
Howard Hinnant
3e2740a36c
Dimitry Andric: Silence some warnings in <locale>.
...
llvm-svn: 167492
2012-11-06 21:48:33 +00:00
Howard Hinnant
a01739a03a
Enable the tuple interface of pair in C++03 mode.
...
llvm-svn: 167491
2012-11-06 21:42:45 +00:00
Howard Hinnant
cd47cbc7a4
Provide a way to disable use of extern templates in libc++. This is intended for the clients of libc++, not the libc++ build. The dylib should always contain the extern templates. To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.
...
llvm-svn: 167486
2012-11-06 21:08:48 +00:00
Howard Hinnant
66e7ed959f
peek should set eofbit if sgetc() returns eof.
...
llvm-svn: 167238
2012-11-01 17:32:07 +00:00
Howard Hinnant
b304811686
Richard Smith: This fixes a problem in std::is_constructible for incomplete types, and those types with a user-defined operator,().
...
llvm-svn: 167233
2012-11-01 16:32:14 +00:00
Howard Hinnant
54d333a601
Rename uses of _ and __ because these are getting stepped on by macros from other system code.
...
llvm-svn: 167038
2012-10-30 19:06:59 +00:00
Howard Hinnant
6758190507
Use traits_type::to_int_type in basic_streambuf<_CharT, _Traits>::xsputn when calling overflow to correctly handle negative signed character types. This fixes http://llvm.org/bugs/show_bug.cgi?id=14074 .
...
llvm-svn: 165884
2012-10-13 19:31:51 +00:00
Howard Hinnant
7ba8160360
Dimitry Andric: FreeBSD only: Add the C11 aligned_alloc to <cstdlib> and adjust the inclusion of quick_exit.
...
llvm-svn: 165882
2012-10-13 18:03:53 +00:00
Argyrios Kyrtzidis
88db3171dd
Don't neglect to "return *this".
...
llvm-svn: 165860
2012-10-13 02:03:45 +00:00
Howard Hinnant
f543a75be1
Holger Arnold: Correct the use and testing of __GNUC__ and __GNUC_MINOR__ in <__config>.
...
llvm-svn: 165151
2012-10-03 20:48:05 +00:00
Howard Hinnant
6e551ae1a3
Make vector::iterator and string::iterator more resilient against overly generic relational operators.
...
llvm-svn: 165033
2012-10-02 19:45:42 +00:00
Howard Hinnant
59fb5c6559
Due to a mistake on my own part, I need to burn some version numbers. This does not impact any of the implementation of libc++, and does not impact the ABI in any way.
...
llvm-svn: 164832
2012-09-28 17:42:25 +00:00
Howard Hinnant
324c084654
Bump _LIBCPP_VERSION to 1002
...
llvm-svn: 164700
2012-09-26 15:38:09 +00:00
Howard Hinnant
8e747d3671
Apply the emulated nullptr_t with constexpr. This is an unusual configuration that would take advantage of this. But it has popped up in the wild and does no harm to support it.
...
llvm-svn: 164575
2012-09-24 23:36:40 +00:00
Howard Hinnant
c43826f003
Add overflow check to tanh(complex) and reduce to finite answer. Fixes http://llvm.org/bugs/show_bug.cgi?id=13874
...
llvm-svn: 164266
2012-09-19 23:51:47 +00:00