I wrote code that looked like the following:
template<typename CocoaWidget>
class Widget : boost::noncopyable
{
private:
CocoaWidget* mCocoaWidget;
public:
Widget()
{
mCocoaWidget = [[CocoaWidget alloc] init];
}
// ...
};
class Button : Widget<NSButton>
{
// ...
};
But that doesn't work, because Mac Dev Center says:
Objective-C classes, protocols, and categories cannot be declared inside a C++ template
So what shall I do now best?