D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 6692 - std.math.sin function pointer
Summary: std.math.sin function pointer
Status: RESOLVED DUPLICATE of issue 4541
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P2 enhancement
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-19 05:08 UTC by bearophile_hugs
Modified: 2011-09-19 07:23 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2011-09-19 05:08:48 UTC
In some situations I'd like the std.math.sin and std.math.cos functions to be more flexible and more *uniform* with all other user-written functions:


import std.math;
void main() {
    auto a = [&sin, &cos];


Intrinsics have some advantages, but a uniform way to manage functions (especially functions as common as sin/cos) is handy and allows some usages that are not possible now (workaround: to do it I use small wrapper functions for sin and cos).

Is it possible to have sin and cos functions usable like the other functions?
Comment 1 yebblies 2011-09-19 07:23:21 UTC

*** This issue has been marked as a duplicate of issue 4541 ***