dhoke
2008-06-06 19:04:12 UTC
With bds2006, the code further below produces the error:
Error E2285 bds2006_bug.cpp 21: Could not find a match for
'some_s::some_s(int (
*)[10])' in function otherfunc(some_s2 &)
line 21 is where itemb is being defined. I can see no difference between it
and itema, which does not generate an error, that should cause such an
error. (I have worked around this by declaring a second constructor taking
a pointer, and then de-referencing the pointer in the constructor
initialization list, since the rest of the class implementation was already
referencing the member reference variable.)
Someone, if they agree that it shouldn't produce this error, may wish to try
it with 2007, and report it if its still a problem.
=====================
struct some_s
{
int (&m_arr10x10)[10][10] ;
some_s(int (&p_arr10x10)[10][10])
: m_arr10x10( p_arr10x10 )
{
}
} ;
struct some_s2
{
int arr10x10[10][10] ;
} ;
void otherfunc(some_s2 &ans2)
{
int arr10x10[10][10] ;
some_s itema( arr10x10 ) ;
some_s itemb( ans2.arr10x10 ) ;
}
=====================
Error E2285 bds2006_bug.cpp 21: Could not find a match for
'some_s::some_s(int (
*)[10])' in function otherfunc(some_s2 &)
line 21 is where itemb is being defined. I can see no difference between it
and itema, which does not generate an error, that should cause such an
error. (I have worked around this by declaring a second constructor taking
a pointer, and then de-referencing the pointer in the constructor
initialization list, since the rest of the class implementation was already
referencing the member reference variable.)
Someone, if they agree that it shouldn't produce this error, may wish to try
it with 2007, and report it if its still a problem.
=====================
struct some_s
{
int (&m_arr10x10)[10][10] ;
some_s(int (&p_arr10x10)[10][10])
: m_arr10x10( p_arr10x10 )
{
}
} ;
struct some_s2
{
int arr10x10[10][10] ;
} ;
void otherfunc(some_s2 &ans2)
{
int arr10x10[10][10] ;
some_s itema( arr10x10 ) ;
some_s itemb( ans2.arr10x10 ) ;
}
=====================