digitalmars.D - Basic example of "std.process.pipe" not working. Error: template
- BoQsc (20/20) Oct 16 2023 https://dlang.org/library/std/process/pipe.html
- BoQsc (2/2) Oct 16 2023 ### run.dlang.io example
- Adam D Ruppe (6/8) Oct 16 2023 When you do this, you get ALL things that match a name from the
- bachmeier (5/9) Oct 16 2023 It would be nice if the error message included this information
- Imperatorn (9/29) Oct 16 2023 ```d
https://dlang.org/library/std/process/pipe.html ``` import std; void main() { auto p = pipe(); } ``` Output: ``` /dlang/dmd/linux/bin64/../../src/phobos/std/functional.d(1272): Error: template instance `std.functional.compose!()` does not match template declaration `compose(fun...)` with `fun = ()` must satisfy the following constraint: ` fun.length > 0` onlineapp.d(5): Error: template instance `std.functional.pipe!()` error instantiating ```
Oct 16 2023
On Monday, 16 October 2023 at 17:23:10 UTC, BoQsc wrote:import std;When you do this, you get ALL things that match a name from the whole stdlib. pipe is used in a couple places.auto p = pipe();make this p = std.process.pipe(); to clarify which version you want and it might work , or change the import std; over to import std.process.
Oct 16 2023
On Monday, 16 October 2023 at 17:33:23 UTC, Adam D Ruppe wrote:On Monday, 16 October 2023 at 17:23:10 UTC, BoQsc wrote:It would be nice if the error message included this information (at a generic level, not specific to this case). If there's no matching function and you've done import.std, it should tell the user to check for that type of conflict.import std;When you do this, you get ALL things that match a name from the whole stdlib. pipe is used in a couple places.
Oct 16 2023
On Monday, 16 October 2023 at 17:23:10 UTC, BoQsc wrote:https://dlang.org/library/std/process/pipe.html ``` import std; void main() { auto p = pipe(); } ``` Output: ``` /dlang/dmd/linux/bin64/../../src/phobos/std/functional.d(1272): Error: template instance `std.functional.compose!()` does not match template declaration `compose(fun...)` with `fun = ()` must satisfy the following constraint: ` fun.length > 0` onlineapp.d(5): Error: template instance `std.functional.pipe!()` error instantiating ``````d import std.process; void main() { auto p = pipe(); // do stuff } ```
Oct 16 2023