Commit graph

471 commits

Author SHA1 Message Date
Jonathan M Davis
5dc7aa2421 Fix issue #13017: opEquals for null std.typecons.Nullable
I was getting sick of this not working, and there have been multiple bug
reports on this, so I'm just fixing it. With these changes, using == and
!= on null Nullables will not result in an AssertError but instead will
consider them equal if they're both null, equal if they're both non-null
and have the same value, and not equal otherwise.
2017-01-14 11:37:56 -08:00
Sebastian Wilzbach
e67c579f91 Add nullable{,Ref} construction functions 2016-12-23 23:22:21 +01:00
Jack Stouffer
be8713aedb Merge pull request #4906 from ntrel/tuple-docs
Improve tuple-related docs
2016-12-21 10:28:57 -05:00
Nick Treleaven
cfa3077fd8 Tweak docs 2016-12-15 12:32:49 +00:00
Sebastian Wilzbach
c5ba7c7d0b Style fix: Add whitespace between import colon 2016-12-08 01:46:46 +01:00
Sebastian Wilzbach
df2e72d113 Style fix: add whitespace after if/while 2016-12-08 01:46:46 +01:00
Nick Treleaven
346cad313a Improve tuple-related docs
Use auto instead of ReverseTupleType as that is private.
2016-11-17 16:31:13 +00:00
Martin Nowak
3bed8dfd33 fix gdc-dmd test - remove the workound for Issue 15316
- we can't really solve Issue 15316 w/ signaling NaNs
  b/c any optimization, copying et.al. might turn signaling into
  quiet NaNs, therefor we want to solve Issue 15316 by switching
  Float.init to use quiet NaNs
- the workaround depends on a specific dmd bug (see #6163)
  that looses SNaNs when writing struct initializers but keeps
  them for Float.init
- this workaround might not be portable to GDC/LDC and
  will easily break w/ slightly different dmd optimizations
  (it's responsible for the test failure of the gdc-built dmd)
- this PR will reopen https://issues.dlang.org/show_bug.cgi?id=11135

this partially reverts commit 0efa1d3bf9
2016-10-09 03:53:33 +02:00
Andrei Alexandrescu
ace0b93788 Merge pull request #4763 from tmccombs/unique-cleanup
Unique cleanup
2016-10-01 00:48:12 -04:00
Walter Bright
e06ee589b9 add 'return' annotation to Tuple.rename() 2016-09-24 17:52:55 -07:00
Andrei Alexandrescu
bf14b1897e Merge pull request #3797 from Cauterite/issue11135
Issue 11135 - Nullable(T, T nullValue) does not support NaN
2016-09-23 16:24:52 -04:00
Jack Stouffer
f10e3fd608 Remove package wide std.algorithm imports from std/typecons.d 2016-09-20 11:05:17 +01:00
Andrei Alexandrescu
b97f0050be Merge pull request #4043 from John-Colvin/named
Add std.typecons.Tuple.rename
2016-09-19 20:23:35 -04:00
John Colvin
657a0ff30f make sure Tuple method unittests aren't massively duplicated 2016-09-19 18:27:06 +02:00
Thayne McCombs
ae8fa4ed5a Replace deprecated delete 2016-09-17 22:25:54 -06:00
Thayne McCombs
dcf9faa8dc Use Proxy instead of opDot 2016-09-17 22:25:54 -06:00
Walter Bright
0fbd57c283 make Proxy.accessibleFrom() work with 'scope' inference 2016-09-11 04:20:10 -07:00
John Colvin
21d65b6a23 test typecons.Tuple.rename for sucessful no-ops, working around bug 16418 2016-09-02 09:11:20 +01:00
John Colvin
f2a49114cc simplify typecons.Tuple.rename implementation 2016-09-02 09:11:20 +01:00
John Colvin
bc22574fa6 fix std.typecons.Tuple.rename LREFs 2016-09-02 09:11:20 +01:00
John Colvin
ef448f92d2 complete std.typecons.Tuple.rename range example 2016-09-02 09:11:20 +01:00
John Colvin
cb59a64b54 make all std.typecons.Tuple.rename unittests @safe 2016-09-02 09:11:20 +01:00
John Colvin
5c23826279 std.typecons.Tuple.rename return by ref 2016-09-02 09:11:20 +01:00
John Colvin
239e4c8daf add std.typecons.Tuple.rename 2016-09-02 09:11:20 +01:00
Cauterite
0efa1d3bf9 workaround for bug 11135 (typecons.Nullable) 2016-08-19 23:52:22 +10:00
Cauterite
e50b77fbce document unittest 2016-07-27 01:41:31 +10:00
Cauterite
52110d98db appeasing the brace Nazis 2016-07-27 00:18:42 +10:00
Cauterite
052fcc9430 tab -> spaces
god forbid anyone have a tab in their code ¬_¬
2016-07-26 22:56:53 +10:00
Cauterite
c0fb999749 make Unique.opDot() inout
typecons.Unique.opDot() should be inout to allow use through const access paths.
2016-07-26 22:48:27 +10:00
Atila Neves
270abec779 Add @system and @safe to std.typecons unit tests 2016-07-10 14:30:36 +02:00
Jack Stouffer
dffa714429 Fixed std.algorithm imports in std.typecons to not be package wide 2016-07-02 23:56:36 -04:00
Andrei Alexandrescu
3a0caddfb5 Merge pull request #4483 from WalterBright/typeconsinfer
std.typecons: prevent inference of attributes of test cases
2016-06-27 19:48:04 -04:00
Walter Bright
eddcadd90a std.typecons: prevent inference of attributes of test cases 2016-06-27 11:45:07 -07:00
Steven Schveighoffer
d42eff4ff8 Merge pull request #4450 from burner/typecons_implicit_string_join
std.typecons implicit string join
2016-06-21 13:36:18 -04:00
Robert burner Schadek
db42ef2550 std.typecons implicit string join
made explicit
2016-06-21 14:33:43 +02:00
Andrei Alexandrescu
c9a9bb69e0 Merge pull request #4430 from WalterBright/typecons-uintptr
typecons: size_t should be uintptr_t
2016-06-18 07:28:22 -04:00
Andrei Alexandrescu
5d6569a3e5 Merge pull request #4344 from aG0aep6G/16054
fix issue 16054 - can break immutable with std.typecons.Rebindable
2016-06-18 05:10:43 -04:00
Sebastian Wilzbach
ec47ac4224 Remove the WEB macro in favor of HTTP
replacement: sed 's/\$(WEB/\$(HTTP/g' -i **/*.d
2016-06-16 00:14:51 +02:00
Walter Bright
bd2d48b9b3 typecons: size_t should be uintptr_t 2016-06-14 14:40:39 -07:00
Sebastian Wilzbach
49531e3c73 fix broken web links
sed 's/(WEB http:\/\//(WEB /' -i **/*.d
2016-06-07 18:54:17 +02:00
Sebastian Wilzbach
2dfbc51f17 Standardize whitespace after imports
Unified with:

sed -E "s/import\s*([^ ]+)\s*:\s*(.*(,|;))/import \1 : \2/" -i **/*.d
2016-05-29 22:09:56 +02:00
anonymous
764caefa36 XREF -> REF (sed)
Done by:

(find . -type f -name "*.d" -print0; \
    find . -type f -name "*.dd" -print0) | \
xargs -0 sed -i -r \
    's/\$\(XREF\s+([^(),]*),\s*([^(),]*)\)/$(REF \2, std,\1)/g'
2016-05-27 21:32:46 +02:00
Sebastian Wilzbach
18b8abf60a remove the deprecated wiki macros 2016-05-27 05:52:23 +02:00
Jack Stouffer
b7165c04bc Move Ternary from std.experimental.allocator.common to std.typecons 2016-05-24 10:27:10 -04:00
anonymous
b391486693 fix issue 16054 - can break immutable with std.typecons.Rebindable 2016-05-22 00:33:19 +02:00
Sebastian Wilzbach
f891779f25 use the new alias syntax 2016-04-27 01:56:50 +03:00
Sebastian Wilzbach
3d67cd228c style fix: space between operators 2016-04-26 22:26:20 +03:00
k-hara
114e2886d1 Use __traits(identifier) instead of stringof + startsWith in std.typecons.Proxy
It's more lightweight.
2016-03-31 10:36:26 +09:00
H. S. Teoh
3d15c1f3a9 Merge pull request #4129 from ntrel/scoped-docs
Improve docs for `std.typecons.scoped`
2016-03-29 17:43:57 -07:00
Nick Treleaven
0e6f9c0338 Improve docs for std.typecons.scoped
Fix note about moving a class instance.
Show automatic destruction of `scoped` result.
Show how `scoped` can lead to invalid class references.
Show move(typeof(scoped!A)) is wrong.
Show scoped member variable initialization.
2016-03-29 13:49:29 +01:00