Dmd doesn't like tuples or me :>

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at
Fri Dec 11 17:48:22 PST 2015

On 12/11/2015 05:41 PM, Enjoys Math wrote:
 > import std.stdio;
 > import std.typecons;
 > int main(string[] argv)
 > {
 >      auto value = Tuple(5, 6.7, "hello");

I don't understand how it relates to the error message but you should 
use lowercase 'tuple' there:

     auto value = tuple(5, 6.7, "hello");

tuple() is the convenience function template that takes care of type 
deduction. Otherwise, you would have to write it like this:

     auto value = Tuple!(int, double, string)(5, 6.7, "hello");

Both lines are equivalent.


More information about the Digitalmars-d-learn mailing list