function not callable using struct constructor
    alex burton 
    alexibu.remove at me.com
       
    Thu Jan  2 19:13:12 PST 2014
    
    
  
struct Foo
{
};
void bar(ref Foo f)
{
}
void main()
{
	bar(Foo());		//Error: function test.bar (ref Foo f) is not 
callable using argument types (Foo)
}
I get the above error with 2.064 not with 2.060.
Is it a bug ?
Is it a feature ?
If so :
Why can't I take a non const ref to a temp struct - It might look 
a bit silly but I might be doing it to avoid copying.
I could still do this :
void main()
{
	Foo f = Foo();
	bar(f);
}
Which is equivalent AFAIK
    
    
More information about the Digitalmars-d
mailing list