Marshall Clow
db78c7049e
Fix LWG Issue 2141: common_type trait produces reference types
...
llvm-svn: 192142
2013-10-07 23:43:33 +00:00
Howard Hinnant
04c63bdb36
G M: Rename local variable from __except to avoid MSVC keyword clash.
...
llvm-svn: 192072
2013-10-06 21:00:29 +00:00
Howard Hinnant
32f9a776fb
Use _LIBCPP_NEW_DELETE_VIS instead of LIBCPP_FUNC_VIS in src/new.cpp.
...
llvm-svn: 192071
2013-10-06 20:53:24 +00:00
Howard Hinnant
f66a81ad56
Yaron Keren: Add missing comment.
...
llvm-svn: 192068
2013-10-06 19:48:40 +00:00
Marshall Clow
dbd2ebb07e
LWG Issue 2247: Implement type trait 'is_null_pointer'
...
llvm-svn: 192049
2013-10-05 21:21:17 +00:00
Marshall Clow
ea7c7cc521
Implement literal suffixes for compled
...
llvm-svn: 192048
2013-10-05 21:19:49 +00:00
Marshall Clow
3ceafc7f01
Mark namespaces for user defined literals as 'inline'
...
llvm-svn: 192047
2013-10-05 21:18:32 +00:00
Marshall Clow
de9320aa2b
Implement LWG issue 2275 'forward_as_tuple should be constexpr'
...
llvm-svn: 192038
2013-10-05 18:46:37 +00:00
Howard Hinnant
a942f2ffd7
G M: The attached patch is for libcxx's new.cpp and __config files. The patch's intent is to make new.cpp compile using MS's cl.exe compiler without changing the meaning of anything for any other compiler.
...
The issue this patch seeks to address is that MS's compiler (cl.exe) doesn't support the __attribute__((__weak__)) or __atribute__((__visibility__("default")) syntax; so a solution must be found where cl.exe doesn't see this syntax.
This patch seeks to solve this problem by changing code patterned like this:
__attribute__((__weak__, __visibility__("default")))
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { /*snip*/; return p; }
to code like this:
_LIBCPP_WEAK
void* operator new(size_t size, const std::nothrow_t&) _NOEXCEPT { return p; }
Howard: Thanks for all the comments regarding the default visibility
tag on the definition. I agree it isn't needed, and that there are lots
of other places where it is missing. That being said, I'm not wanting
to rock the boat on that issue right now. So I've added it back to the
definition via _LIBCPP_FUNC_VIS. A later pass dedicated just to this
issue can bring things in to a consistent state one way or the other.
Note that we do not want to have the exact same attributes on the
declaration and defintion in this case. The declaration should not be
marked weak, whereas the definition should (which is what G M's patch
did). I've fully tested on OS X to ensure that the resultant attribute
syntax actually works.
llvm-svn: 192007
2013-10-04 23:56:37 +00:00
Howard Hinnant
3af48ef76e
G M: Changes all references to "x inline" to "inline x" where x = _libcpp_always_inline or _libcpp_inline_visibility macros.
...
The patch touches these files:
locale
array
deque
new
string
utility
vector
__bit_reference
__split_buffer
locale_win32.h
There is no intended functionality change and it is expected that reversing the position of the inline keyword with regard to the other keywords does not change the meaning of anything, least not for apple/Linux etc.
It is intended to make libcxx more consistent with itself and to prevent the 1000 or so
"inline.cpp(3) : warning C4141: 'inline' : used more than once" warnings that MS's cl.exe compiler emits without this patch, i.e. if inline is not the first keyword before a function name etc.
Prefer "inline [other inline related keyword]" over "[other related keyword] inline".
After this patch, libcxx should be consistent to this pattern.
llvm-svn: 191987
2013-10-04 22:09:00 +00:00
Howard Hinnant
f7a8c4f347
G M: Fix libcxx's detection of rtti disablement for g++.exe and cl.exe. When RTTI is NOT enabled, _LIBCPP_NO_RTTI is defined.
...
llvm-svn: 191981
2013-10-04 21:24:21 +00:00
Howard Hinnant
80b84d4c26
G M: Provides the _LIBCPP_WARNING macro, to be used for MSVC only, since that compiler doesn't support #warning.
...
llvm-svn: 191980
2013-10-04 21:14:44 +00:00
Marshall Clow
ad864049d6
Remove non-printable chars that snuck in back in July; thanks to Yaron Keren for the catch
...
llvm-svn: 191756
2013-10-01 13:28:20 +00:00
Marshall Clow
45b983c4d0
Part 8 of LWG Issue 2210' unordered_set and unordered multiset; this got missed when I went on vacation
...
llvm-svn: 191705
2013-09-30 21:33:51 +00:00
Howard Hinnant
9fd9f84f48
SCARY/N2913 iterator support between the multi and non-multi versions of the associative and unordered containers. I beleive lack of support for this was accidentally recently introduced (by me) and this is fixing a regression. This time tests are put in to prevent such a regression in the future.
...
llvm-svn: 191692
2013-09-30 19:08:22 +00:00
Marshall Clow
3d5134dd52
Implement n3789; constexpr support in named function objects
...
llvm-svn: 191626
2013-09-28 19:06:12 +00:00
Marshall Clow
8392ab209e
Add a set of macros for using the new '[[[deprecated]]' attribute. No code changes (yet)
...
llvm-svn: 191625
2013-09-28 18:35:31 +00:00
Howard Hinnant
7a828034c6
Peter Collingbourne: If a pointer is passed as the third argument of the (iterator,
...
iterator, allocator) constructor with the intention of it being
implicitly converted to the allocator type, it is possible for overload
resolution to favour the (iterator, iterator, enable_if) constructor.
Eliminate this possibility by moving the enable_if to one of the
existing arguments and removing the third argument.
llvm-svn: 191145
2013-09-21 21:13:54 +00:00
Howard Hinnant
ff29d538ea
Apply LWG 2048. It is amazing to me that this actually works, but the existing tests confirm that it does. c++1y status page now showing libc++ is complete for c++1y modulo dynarray issues.
...
llvm-svn: 191142
2013-09-21 19:25:37 +00:00
Howard Hinnant
f13cf89df2
Apply LWG 2021. This is only a documentation change. Also bringing c++1y status page up to date.
...
llvm-svn: 191141
2013-09-21 18:17:23 +00:00
Howard Hinnant
b76e6a95a9
Apply LWG 2017. This is a only a documentation change.
...
llvm-svn: 191140
2013-09-21 17:58:58 +00:00
Howard Hinnant
ead6f1699d
N3659: Shared locking in C++ Revision 2, c++1y only
...
llvm-svn: 191127
2013-09-21 01:49:28 +00:00
Howard Hinnant
b1c82cd090
David Chisnall: macro protect 'test' in __has_pointer_type_imp.
...
llvm-svn: 191126
2013-09-21 01:45:05 +00:00
Howard Hinnant
5f878d4bd2
G M: Restore the ability for libcxx to compile again on mingw 64.
...
llvm-svn: 190837
2013-09-17 01:34:47 +00:00
Howard Hinnant
3b2d7ee18c
Marshall Clow: LWG Issue 2056: future_errc enums start with value 0 (invalid value for broken_promise).
...
llvm-svn: 190756
2013-09-14 18:20:10 +00:00
Marshall Clow
a369cb6280
LWG Issue 2210 (Part #7 ): vector and vector<bool>
...
llvm-svn: 190736
2013-09-14 00:47:59 +00:00
Howard Hinnant
84f996fb2e
G M: Make shared_ptr a little more gentle for some compilers. No impact on clang.
...
llvm-svn: 190732
2013-09-13 23:56:00 +00:00
Howard Hinnant
f35fc7ad74
G M: Make valarray a little more forgiving to compilers not quite so gifted. This has no impact on clang.
...
llvm-svn: 190731
2013-09-13 23:27:42 +00:00
Marshall Clow
ef6f1151b0
Initial implementation of <dynarray>. No allocator support pending resolution of LWG #2235 ; no stack allocation pending compiler support
...
llvm-svn: 190697
2013-09-13 15:22:55 +00:00
Marshall Clow
3cd37e6456
LWG Issue 2210 (Part #6 ): unordered_map and unordered_multimap
...
llvm-svn: 190576
2013-09-12 03:00:31 +00:00
Marshall Clow
50c003b577
Implement uses-allocator construction
...
llvm-svn: 190571
2013-09-12 02:11:16 +00:00
Howard Hinnant
872ac4b5f0
A collection of minor type-o fixes. The first two aren't testable, but all tests pass with them. I stumbled across them while experimenting with a std::move that checks its argument for non-const. The third corrects a test that is currently failing.
...
llvm-svn: 190563
2013-09-12 00:10:44 +00:00
Marshall Clow
6e8ebb2ce9
Adding bad_array_length to libc++
...
llvm-svn: 190478
2013-09-11 01:38:42 +00:00
Marshall Clow
fbc317d480
LWG Issue #2210 Part 5 - map/multimap; no, really - the last one was set/multiset. THIS is map/multimap
...
llvm-svn: 190474
2013-09-11 01:15:47 +00:00
Marshall Clow
0a55d17bcd
LWG Issue #2210 Part 4 - map/multimap
...
llvm-svn: 190454
2013-09-11 00:06:45 +00:00
Marshall Clow
f1b6d1b538
Update synopsis for list/forward_list/deque to match the allocator style of existing comment. No code change
...
llvm-svn: 190320
2013-09-09 18:19:45 +00:00
Marshall Clow
fb8297668f
LWG Issue 2210 (Part #2 & #3 ): list and forward_list
...
llvm-svn: 190279
2013-09-08 19:11:51 +00:00
Marshall Clow
630c5e535c
LWG Issue 2210 (Part #1 ): deque
...
llvm-svn: 190251
2013-09-07 16:16:19 +00:00
Marshall Clow
ef44edfde4
N3545: Quoted strings
...
llvm-svn: 190032
2013-09-05 04:48:45 +00:00
Marshall Clow
5155a569d1
LWG Issue 2148: Hashing Enums
...
llvm-svn: 189831
2013-09-03 17:55:32 +00:00
Marshall Clow
710a902cac
Updated the synopsis for weak_ptr<T>::owner_before to match the code. No code changes.
...
llvm-svn: 189812
2013-09-03 14:37:50 +00:00
Howard Hinnant
e7d746d8b9
Implement N3672, optional<T>.
...
llvm-svn: 189772
2013-09-02 20:30:37 +00:00
Howard Hinnant
69bc206547
SFINAE out duration converting constructor if the constructor would otherwise cause a ratio compile-time overflow. This fixes LWG 2094.
...
llvm-svn: 189722
2013-08-31 16:51:56 +00:00
Howard Hinnant
525dc284b4
is_destructible for function types was mistakenly returning true instead of false. This is true in both C++11 and C++1y, but has been clarified by the post C++11 LWG issue 2049.
...
llvm-svn: 189687
2013-08-30 19:12:42 +00:00
Howard Hinnant
d0a4d73623
Xing Xue: Fix type-o. Thanks to C. Bergström for spotting it.
...
llvm-svn: 189674
2013-08-30 14:42:39 +00:00
Marshall Clow
1e548c72e7
LWG Issue 2128: Implement global cbegin/rbegin/cend/rbegin
...
llvm-svn: 189634
2013-08-30 01:17:07 +00:00
Howard Hinnant
b81766ca23
Glen: Remove unneeded _LIBCPP_ALWAYS_INLINE.
...
llvm-svn: 189626
2013-08-29 23:50:48 +00:00
Howard Hinnant
9762413621
Xing Xue: Some minor changes for IBM XLC++/AIX.
...
llvm-svn: 189623
2013-08-29 23:37:50 +00:00
Howard Hinnant
393068bb04
Turn off extern templates for most uses. It is causing more problems than it is worth. The extern templates will still be built into the dylib, mainly for ABI stability purposes. And the client can still turn these back on with a #define if desire. This fixes http://llvm.org/bugs/show_bug.cgi?id=17027 . However there's no associated test for the test suite because http://llvm.org/bugs/show_bug.cgi?id=17027 needs mismatched dylib and headers to fire.
...
llvm-svn: 189610
2013-08-29 20:56:53 +00:00
Marshall Clow
06fbed03fc
LWG Issue 2162: mark allocator_traits::maxsize as noexcept
...
llvm-svn: 189399
2013-08-27 20:22:15 +00:00