[Q]: Number of overloaded functions...
-
Hello, I got some code that overloads the use of overloading functions. What is the maximum number of overloaded functions a function can have in VC 7.1 (.NET 2003)?
void GetValue(bool &isValue, UINT keyId, UINT sectionId);
void GetValue(bool &isValue, const CString& keyName, UINT sectionId);
void GetValue(bool &isValue, UINT keyId, const CString& sectionName);
void GetValue(bool &isValue, const CString& keyName, const CString& sectionName);
...
// Repeat the above 4 for char, unsigned char, short, unsigned short,
// int, unsigned int, double, __int64
...
void GetValue(__int64 &value, const CString& keyName, const CString& sectionName);Intellicense of VC recognices only the first 12 overloaded signatures, when expanding with CTRL-Space. Compilation is O.K even with a highest warning level, which does not hide the possibility that the compiler is casting the values of the last overloaded functions. Running PC-Lint gives some warnings as only 12 overloaded signatures are present. Any comment? --- Rbid. (I'm not the one that loves to overload!)
-- **Ricky Marek** (_AKA: rbid_)
-- "Things are only impossible until they are not" --- Jean-Luc Picard My articles -
Hello, I got some code that overloads the use of overloading functions. What is the maximum number of overloaded functions a function can have in VC 7.1 (.NET 2003)?
void GetValue(bool &isValue, UINT keyId, UINT sectionId);
void GetValue(bool &isValue, const CString& keyName, UINT sectionId);
void GetValue(bool &isValue, UINT keyId, const CString& sectionName);
void GetValue(bool &isValue, const CString& keyName, const CString& sectionName);
...
// Repeat the above 4 for char, unsigned char, short, unsigned short,
// int, unsigned int, double, __int64
...
void GetValue(__int64 &value, const CString& keyName, const CString& sectionName);Intellicense of VC recognices only the first 12 overloaded signatures, when expanding with CTRL-Space. Compilation is O.K even with a highest warning level, which does not hide the possibility that the compiler is casting the values of the last overloaded functions. Running PC-Lint gives some warnings as only 12 overloaded signatures are present. Any comment? --- Rbid. (I'm not the one that loves to overload!)
-- **Ricky Marek** (_AKA: rbid_)
-- "Things are only impossible until they are not" --- Jean-Luc Picard My articlesI'm not sure about VC 7.1 but with VS6, I have a class with two methods, each overloaded several dozens of times. Twelve seems awfully skimpy.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow