C++ : "is not derived from type"..
C++ : "is not derived from type"..
- Subject: C++ : "is not derived from type"..
- From: Dan Caugherty <email@hidden>
- Date: Tue, 20 Oct 2009 22:08:48 -0400
Hey all --
This is more of a C++ question than anything else, but I'm not sure
why I'm seeing an error in this case.
I'm trying to use the linkage<> template below like a traits class
definition, but for some reason, the final
class template definition's scope doesn't seem to include it. Why?
typedef unsigned int function_return_type;
typedef function_return_type (*cpp_function_type)(...);
extern "C" {
typedef function_return_type (*c_function_type)();
}
template <bool IsCPP> class linkage;
template <>
class linkage<true> {
public:
typedef cpp_function_type function_type;
};
template <>
class linkage<false> {
public:
typedef c_function_type function_type;
};
template < bool IsCPP = true >
class call_some_function {
public:
typedef linkage<IsCPP>::function_type function_type; //ERROR:
call_some_function<IsCPP> is not derived from type linkage<IsCPP>
};
This is probably something very obvious, but it's eluding me. Anyone know?
Thanks,
-- Dan Caugherty
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden