Thread overview
Basic example of "std.process.pipe" not working. Error: template instance `std.functional.pipe!()` error instantiating
Oct 16, 2023
BoQsc
Oct 16, 2023
BoQsc
Oct 16, 2023
Adam D Ruppe
Oct 16, 2023
bachmeier
Oct 16, 2023
Imperatorn
October 16, 2023

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
October 16, 2023

run.dlang.io example

https://run.dlang.io/is/uAI7qM

October 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.
October 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:
>> 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.

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.
October 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
import std.process;

void main()
{
	auto p = pipe();
	// do stuff
}