Has anybody come across a good/elegant way of fixing this code when compiling in Visual Studio 2017? I saw a reference to this article which seems similar but not quite the same.....dlp::Number is a template that is called by a template, etc for several layers up the stack. When I look at the "fix" in this article, I get the same errors further up the call stack.
/** @brief Contains common functions to convert numbers to strings
* @ingroup group_Common
*/
namespace Number{
/** @brief Converts a numerical variable to its ASCII string equivalent */
template <typename T>
std::string ToString( T number ){
std::ostringstream ss;
ss << std::setprecision(NUM_TO_STRING_PRECISION);
ss << number;
return ss.str();
}
template <> std::string ToString<std::string>( std::string string );
template <> std::string ToString<char>( char number );
template <> std::string ToString<unsigned char>( unsigned char number );
}
Error C2593 'operator <<' is ambiguous C:\junk\VisualStudioLightCrafterSDKx86\include\common\other.hpp DLP_SDK 220 Build
Error C2088 '<<': illegal for class C:\junk\VisualStudioLightCrafterSDKx86\include\common\other.hpp DLP_SDK 220 Build