﻿id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc
52	Resolution fails for initialization	pabuhr	Rob Schluntz <rschlunt@…>	"{{{
void ?{}( int & c, zero_t ) { c = 0; }

trait sumable( otype T ) {
    void ?{}( T &, zero_t );				// constructor from 0 literal
    T ?+?( T, T );					// assortment of additions
    T ?+=?( T &, T );
    T ++?( T & );
    T ?++( T & );
}; // sumable
forall( otype T | sumable( T ) )			// use trait
T sum( unsigned int size, T * a ) {
    T total = 0;					// instantiate T from 0 by calling its constructor
    for ( size_t i = 0; i < size; i += 1 )
	total += a[i];					// select appropriate +
    return total;
}
forall( otype Impl | sumable( Impl ) )
struct Foo {
    Impl * x, * y;
};
int foo() {
    int sa[ 5 ];
    int i /* = sum( 5, sa ) */;				// DOES NOT RESOLVE
    i = sum( 5, sa );					// RESOLVES
    Foo(int) foo;
    int j /* = sum( 5, foo.x ) */;			// DOES NOT RESOLVE
    j = sum( 5, foo.x );				// RESOLVES
}
}}}"	defect	closed	minor	cfa-cc	1.0	fixed		
