In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously (0/null).
A extern( C ) function should be able to take it as either one.
Overloaded enum pops into my mind as example:
enum NULL = 0;
enum NULL = null;
Is this possible somehow?

In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously (0/null).
A extern( C ) function should be able to take it as either one.
Overloaded enum pops into my mind as example:
enum NULL = 0;
enum NULL = null;
Is this possible somehow?

In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously
(0/null).
A extern( C ) function should be able to take it as either one.
Overloaded enum pops into my mind as example:
enum NULL = 0;
enum NULL = null;
Is this possible somehow?

In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously (0/null).
A extern( C ) function should be able to take it as either one.
Overloaded enum pops into my mind as example:
enum NULL = 0;
enum NULL = null;
Is this possible somehow?

In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously
(0/null).
A extern( C ) function should be able to take it as either one.
Overloaded enum pops into my mind as example:
enum NULL = 0;
enum NULL = null;
Is this possible somehow?

In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously
(0/null).
A extern( C ) function should be able to take it as either
one.
Overloaded enum pops into my mind as example:
enum NULL = 0;
enum NULL = null;
Is this possible somehow?

In C NULL can be used as integer as well as null pointer.
Is there a way to create such a type in D?
The type should have only one value which is obviously
(0/null).
A extern( C ) function should be able to take it as either
one.
Overloaded enum pops into my mind as example:
enum NULL = 0;
enum NULL = null;
Is this possible somehow?

That's the ABI hack I mentioned. It abuses the fact that on most
hardware and compiled, a pointer and a structure containing a
single pointer have the same binary representation. It will
likely work, but it isn't guarenteed.