First, compiling and running on Visual Studio 2005 C++ results in the
same. VS2005 is fairly standards-compliant too.
Note that function templates overload, they do not partially
specialize. Therefore #2 is a function overload and #3 is an explicit
specialization of #2.
Let's analyze what happens in Case 2:
TAccessClass <const char*>::dataLength (str);
is a call to
AccessFunctions::dataLength <const char*> (value); // substituting
const char* for the T template parameter
Therefore #1 is selected. (#2 cannot be selected since T = const
char* there and the parameter would be T* = const char** -- remember,
"overload and not partially specialized") -- it has nothing to do
with your intermediary class TAccessClass.
Your best bet is to explictly include the trailing template parameter
so that #3 becomes an explicit specialization of #1.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden