On Friday, 25 February 2022 at 23:34:59 UTC, kdevel wrote:
What about this:
```d
module model; // model.d
import std.file : read; // this line provokes the error
private int read (string filename) // now it's private
{
import std.file;
auto data = std.file.read (filename);
return 0;
}
On Friday, 25 February 2022 at 23:17:14 UTC, Paul Backus wrote:
[...]
Currently, selective imports are implemented using `alias`es
under the hood, which means that the compiler sees your `model`
module as having *two* overloads of `read`:
```d
alias read = std.file.read; // from selective impo
On Friday, 25 February 2022 at 23:05:00 UTC, kdevel wrote:
It seems the template parameter f becomes not aliased to
model.read in the presence of the selective import. Bug or
feature?
I'd call this a bug. Currently, selective imports are implemented
using `alias`es under the hood, which mea
```main.d
module main; // main.d
import std.traits;
import model;
void main ()
{
enum Q = Parameters!read;
}
```
Will not compile with selective import commented out. Hence
main.d must read (alias instead of enum):
```main.d
module main; // main.d
import std.traits;
import model;
void ma
On Sunday, 8 January 2017 at 05:45:52 UTC, Meta wrote:
On Sunday, 8 January 2017 at 03:27:26 UTC, Fabrice Marie wrote:
void main()
{
Cache!(BasicObject, string, lookupBasicObject);
}
In addition to what Nicholas Wilson said, what you're doing
here is the equivalent of writin
On Sunday, 8 January 2017 at 03:27:26 UTC, Fabrice Marie wrote:
void main()
{
Cache!(BasicObject, string, lookupBasicObject);
}
In addition to what Nicholas Wilson said, what you're doing here
is the equivalent of writing `int;`. It doesn't make any sense as
Cache!(...) is a
On Sunday, 8 January 2017 at 03:27:26 UTC, Fabrice Marie wrote:
Hi,
On my first attempt to create a templated class, I'm hitting an
issue that I can't seem to resolve.
I've dustmite'd the code down to:
class Cache(O, K, F)
{
}
void main()
{
class BasicObject
{
}