compare struct with string member is wield;
    Jonathan M Davis 
    jmdavisProg at gmx.com
       
    Tue Oct 11 22:26:26 PDT 2011
    
    
  
On Wednesday, October 12, 2011 05:16:40 Cheng Wei wrote:
> struct S {
>   string str;
> };
> 
> S g_s;
> 
> unittest {
>     S s1;
>     S s2;
>     assert(s1 == s2);         // Success
>     assert(g_s == s1);        // Failed
> }
> 
> Is this expected? If so, may I know the reason? Thanks.
It succeeds on my box (Linux 64) with the latest from git. I assume that 
you're using 2.055? Maybe it's a bug that was fixed since the release.
- Jonathan M Davis
    
    
More information about the Digitalmars-d-learn
mailing list