Commit graph

187 commits

Author SHA1 Message Date
gulugulubing
e8a7280b5d
Remove outdated @safe bug entry from toDelegate documentation (#10672) 2025-03-18 06:36:21 +08:00
Paul Backus
fcffbc0d97
Merge pull request #10625 from 0xEAB/ctEval
Fix #10023 - Add `ctEval` to Phobos
2025-02-07 10:29:04 -05:00
Elias Batek
4e2156110a
Address pbackus’ review
Co-authored-by: Paul Backus <snarwin@gmail.com>
2025-02-03 23:03:49 +01:00
Elias Batek
5b373178c7
Fix unittests of toDelegate (#10631)
As discovered by @Bolpat:
<https://github.com/dlang/phobos/pull/10599#discussion_r1925219756>
2025-01-25 06:41:52 +08:00
Elias Batek
2631a8b145 Fix #10023 - Add ctEval to Phobos 2025-01-19 07:08:37 +01:00
Vladiwostok
706320076a Fix linting issue in functional.d 2025-01-12 17:41:43 +02:00
Elias Batek
262645bf32
Make toDelegate safe for function pointers (#10599)
Co-authored-by: Quirin F. Schroll <Bolpat@users.noreply.github.com>
Co-authored-by: Elias Batek <0xEAB@users.noreply.github.com>
2024-12-30 15:53:25 +08:00
Elias Batek
4c4c37a8bf
Fix #10603 - toDelegate accepts but can’t handle a templated opCall (#10602) 2024-12-30 12:27:50 +08:00
Simen Kjærås
ff25f6dfff
Fix #10380 - Memoize should handle lambdas (#7507) 2024-12-29 09:21:06 +08:00
Vladiwostok
231ae8b68a
Fix D-Scanner linting issues (#9070)
* Fix UndocumentedDeclarationCheck linting issue

* Fix IfConstraintsIndentCheck linting issue

* Address feedback

* Fix publictests CI

* Fix old (libdparse) D-Scanner linting warn
2024-10-27 01:21:56 -07:00
Iain Buclaw
51e5a1b9cb
Add bind to the header table (#8731) (#8733)
Co-authored-by: Steven Schveighoffer <schveiguy@gmail.com>
2023-04-17 12:46:33 +03:00
Paul Backus
c6b4bd9638 [Refactor] Move toCtString to std.conv
Previously, it was duplicated in std.functional and std.sumtype.
2022-03-26 14:04:37 +00:00
Paul Backus
9d1aeeca2b Add std.functional.bind
Fixes Issue 22736 - Add destructuring bind for std.typecons.Tuple tuples
2022-03-07 15:40:27 -05:00
Paul Backus
fbf8a3057a std.functional: use public import for 'forward'
When forward was moved to core.lifetime, a wrapper template was left in
std.functional for the sake of documentation. Since that wrapper
template is now undocumented, it no longer serves any purpose, and can
be removed.
2022-02-01 22:06:15 -05:00
wolframw
befeb005c9 Fix Issue 21457 - std.functional.partial ignores function overloads 2022-01-03 13:21:35 +00:00
Per Nordlöw
049e5da33d Refactor adjoin 2021-10-18 14:11:24 +02:00
Martin Kinkelin
7558583c44 Replace usages of std.functional.forward with core.lifetime.forward
Where it has been moved to. Also get rid of the corresponding tests
in Phobos, an exact copy is in druntime (+ more forward tests).

Also extend a `scoped` test to make sure it properly forwards
r/lvalue-ness of its arguments. This required dlang/druntime#3352
and thus wasn't added in dlang/phobos#7776 directly.
2021-01-31 12:20:09 +01:00
Martin Kinkelin
1a459c5996 Get rid of std.conv.emplace[Ref](), use core[.internal].lifetime
The emplace() stuff was moved to druntime; for some reason, it's still
in Phobos.

I've diffed the two versions, and they are still almost identical (incl.
unittests); the druntime version appears to have seen some improvements
(e.g., forwarding r/lvalueness of the arguments) in the meantime.
2021-01-17 16:02:25 +01:00
Paul Backus
6e2ca3b361 Fix issue 21347 - std.functional.adjoin should work in BetterC 2020-10-29 04:45:15 +01:00
Paul Backus
090dd9d69c Fix issue 6484 - compose can't take multi arg functions 2020-10-29 03:34:46 +01:00
Paul Backus
6661d94792 std.functional: simplify compose 2020-10-29 01:48:14 +01:00
James Gray
2ed6952a71 Issue 14909: Provided a fix for the forward range version of chunkBy so that it can accept predicates refernce variables in the calling function 2020-09-10 20:42:17 +02:00
Geod24
04f3979317 Replace 'Issue XXX' with Bugzilla links
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Adam D. Ruppe
ae93f5317c Use consistent quickindex wrapper around hand-written list-of-links tables 2020-02-21 21:04:05 -05:00
Ben Jones
21949736f6 bugzilla issue 4391 add curry to std.functional (#6963)
bugzilla issue 4391 add curry to std.functional 
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2020-01-02 02:44:32 +01:00
Ali Akhtarzada
398d63169e Fixes issue 20439: fix memoize return statement 2019-12-09 10:42:49 +01:00
MoonlightSentinel
a6e0c15f94 Remove deprecated binaryReverseArgs 2019-11-16 18:23:04 +01:00
ZombineDev
aac6b95b66 [attributes]: Ensure std.functional.memoize is nothrow compatible
Because third-party projects already depend on this. See e.g. gecko0307/dagon:
https://buildkite.com/dlang/phobos/builds/2351#71be0264-16e9-4f8a-ab79-0af45a114741
2019-10-17 09:07:38 +03:00
ZombineDev
52bf1876f7 Fix issue 20302 - Support head const in memoize
Make std.functional.memoize accept functions whose return type or
parameters are head const.
2019-10-16 14:14:37 +03:00
Paul Backus
5cba11a67d
Fix copy-paste error in std.functional.pipe doc 2019-08-11 11:03:43 -04:00
David Gileadi
775bcdee51 Turn on -preview=markdown 2019-07-04 10:28:30 -07:00
Sebastian Wilzbach
b56db9a061 Use selective top-level module imports in std.{functional,getopt,math,net,outbuffer} 2019-05-23 13:20:04 +02:00
Sebastian Wilzbach
8e68c90d5d Use moved core.lifetime.forward for std.functional.forward 2019-01-31 15:57:31 +01:00
The Dlang Bot
3d41721141
Merge pull request #6497 from Zevenberge/feature/15732
Fix issue 15732 - std.function partial does not work with function / delegate references
merged-on-behalf-of: Nathan Sashihara <n8sh@users.noreply.github.com>
2018-07-15 13:06:31 +02:00
Zevenberge
7d1af27290 Checked that the functor passed to partial has some opCall 2018-07-01 12:02:56 +02:00
Sebastian Wilzbach
c324714fde Remove a few cases of underscore escaping 2018-06-04 13:05:01 +02:00
Zevenberge
6ce1e5647d Fix issue 15732 - partial invoke of delegates are not lvalues
Flipped the static if statements in partial. It now checks whether we get a template or a struct/class with opCall overloaded. Else it assumes we get a function.
2018-05-20 21:32:37 +02:00
Jack Stouffer
626cabcdc4 Added Params and Returns to std.functional 2018-04-19 20:13:34 -04:00
Sebastian Wilzbach
42894784dd Markdownify Phobos
$(D word) -> `word`
2018-04-02 22:32:47 +02:00
carblue
727c5cf8bd [Trivial]std.functional: -dip1000 compilable by @safe => @system unittest 2018-03-27 10:07:32 +02:00
Sebastian Wilzbach
d179c82fb4 Deprecate binaryReverseArgs in favor of reverseArgs 2018-03-21 18:31:27 +01:00
Sebastian Wilzbach
c8d8fe0c83
Merge pull request #5348 from radcapricorn/forward
forward: single argument, copy const
2018-01-17 09:51:45 +01:00
Martin Nowak
deb28da3ee Merge remote-tracking branch 'upstream/stable' into merge_stable 2017-08-16 12:17:39 +02:00
Sebastian Wilzbach
afcf16e1d8 std.functional: Fix more DDoc links 2017-07-21 03:42:02 +02:00
Sebastian Wilzbach
98aa8bd0df Fix bookmark table for std.functional 2017-07-21 03:21:06 +02:00
Sebastian Wilzbach
598c563627 Add @safe to unittests to fix CircleCi 2017-07-19 01:09:16 +02:00
Sebastian Wilzbach
aefb5892a3 Merge pull request #4367 from wilzbach/fix_16079
Fix issue 16079 - memoize should work with arrays and objects
2017-07-19 00:28:43 +02:00
Vladimir Panteleev
d0b9555a06
Revert "Sort selective imports"
This reverts commit 998ad51fd7.
2017-06-13 17:51:52 +00:00
Sebastian Wilzbach
2070d867dd Sort multiple packages within one line 2017-06-12 08:18:25 +02:00
Sebastian Wilzbach
998ad51fd7 Sort selective imports 2017-06-12 08:12:09 +02:00