On Wednesday, 27 June 2018 at 17:07:52 UTC, Jonathan M Davis
wrote:
On Wednesday, June 27, 2018 16:19:56 Luka Aleksic via
Digitalmars-d-learn wrote:
[...]
[...]
Well, for one, what's on the left side of the = doesn't
normally affect the type of what's on the right. It does in
some cases w
On Wednesday, 27 June 2018 at 16:19:56 UTC, Luka Aleksic wrote:
[…]
I am getting the following error:
scratch.d(14): Error: struct scratch.pair cannot deduce
function from argument types !()(char, int), candidates are:
scratch.d(2):scratch.pair(T, U)
Failed: ["/usr/bin/dmd", "-v", "-o-
On Wed, Jun 27, 2018 at 04:19:56PM +, Luka Aleksic via Digitalmars-d-learn
wrote:
[...]
> struct pair(T, U) {
> T first;
> U second;
>
> this(T arg_first, U arg_second) {
> first = arg_first;
> second = arg_second;
> }
> };
>
> void main()
On Wednesday, June 27, 2018 16:19:56 Luka Aleksic via Digitalmars-d-learn
wrote:
> Hello,
>
> In the following code:
>
> T first;
> U second;
>
> this(T arg_first, U arg_second) {
> first = arg_first;
> second = arg_second;
> }
> };
>
> void main() {
>
> pair!(char, uint) p1
Hello,
In the following code:
struct pair(T, U) {
T first;
U second;
this(T arg_first, U arg_second) {
first = arg_first;
second = arg_second;
}
};
void main() {
pair!(char, uint) p1 = pair('a', 1);
}
I am getting the f