Boost logo

Boost :

From: Jason Shirk (jasonsh_at_[hidden])
Date: 2005-06-30 14:49:13

I fixed this problem after Beta 2. I can't think of a workaround. We
are failing type deduction too early during partial ordering when
encountering a dependent type.

If you try the June CTP (community technology preview), I think you'll
see the fix, but if not, rest assured, I verified our most recent
internal build compiles this example cleanly (well, we warn about the
use of default int as the return type in main().)

Jason Shirk
VC++ Compiler Team
-----Original Message-----
From: Michael Stevens [mailto:mail_at_[hidden]] 
Sent: Tuesday, June 28, 2005 12:41 PM
Subject: VC8 function template ambiguity problems
Dear All,
I was hoping that VC8 would finally fix up problems with it's ambiguity 
resolution system for function template arguments.
Sadly the current beta version as used for Boost regression tests still
problems. See
for a failure in Boost::uBLAS. The same problem is not shown for
previous VC 
compilers as the offending tests are simply disabled.
The problem can easily be exemplified with the follow code which still
on VC-8
struct range {
template<class V>
struct vector_range {
	typedef range range_type;
template<class V>
struct vector_slice {
	typedef range range_type;
template<class V>
void simple (V &data, const range &r)
template<class V>
void simple (vector_slice<V> &data, const range &r)
template<class V>
void hard (V &data, const typename vector_range<V>::range_type &r)
template<class V>
void hard (vector_slice<V> &data, const typename
main ()
	vector_slice<int> vs;
	simple (vs, range() );
	hard (vs, range() );
There are no problems with the functions 'simple'.
It thinks the functions 'hard' are ambiguous despite the fact that the
parameter is more specialised in the second version. It seems to be
by template parameter dependence of the second parameter.
Anyone know of a workaround?
For those that know a little more about MS compiler, or have support for
Is the current beta of VC-8 close to the final version or is it likely
that i 
such deeply rooted template problems are going be fixed?
Michael Stevens Systems Engineering
34128 Kassel, Germany
Navigation Systems, Estimation  and
                 Bayesian Filtering
Unsubscribe & other changes:

Boost list run by bdawes at, gregod at, cpdaniel at, john at