
Robert Jones wrote:
Ok, first off, this is not explicitly about Boost, which I know is against the Boost guidelines, but I hope you'll all forgive me. Indirectly it is through trying to use Boost that i've bumped into this.
A little code snippet...
#include <cstddef>
template < typename T, std :: size_t sz > struct Block { typedef T type[ sz ][ sz ]; };
template < typename T > void assign( T & assignee, const T & value );
template < typename T, std :: size_t sz > void assign( T ( & assignee )[ sz ], const T ( & value )[ sz ] );
int main( ) { Block< int, 16 > :: type a; const Block< int, 16 > :: type b = { };
assign( a, b ); }
This compiles under Gcc & Comeau, but MS VisStudio reckons the call to assign in main is ambiguous. Any thoughts?
Try comp.lang.c++ - I'd be very interested in the answer.