Re: ambiguous overloaded function.
I tried the following code both with VC++2005 and VC++2008.
In all cases it compiles and links without any problem.
-----------------
#include <cstdio>
#include <tchar.h>
#include <vector>
#include <string>
#include <map>
namespace MyAnn
{
/*
* trait class for multilayer example
* members:
* mapInOut represent each indivdual examples
* key: CONT<T>, value: CONT<T>
*/
template <
typename T,
template <
typename ELEM, typename = std::allocator<ELEM>
> class CONT
class multiLayerExample
{
typedef CONT<T> vecT;
public:
typedef typename std::map<CONT<vecT>, vecT> mapInOut;
};
template <
typename T,
template <
typename ELEM, typename = std::allocator<ELEM>
> class CONT
CONT<CONT<T> > backPropgration(
const typename multiLayerExample<T, CONT>::mapInOut&
examples,
const T& rate,
const typename CONT<T>::size_type& nIn,
const typename CONT<T>::size_type& nOut,
const typename CONT<T>::size_type& nHidden
)
{
CONT<CONT<T> > c;
return c;
}
} // MyAnn
int _tmain(int argc, _TCHAR* argv[])
{
MyAnn::multiLayerExample<double, std::vector>::mapInOut
MultiLayerNeuron;
MyAnn::backPropgration<double, std::vector>(
MultiLayerNeuron, 1.9, 8, 10, 12);
return 0;
}
-----------------
Alex