假设我有两个模板类
template < class T >
class Foo
{
/**/
};
和
template < class T >
class Bar
{
/**/
};
如何将Foo
与Bar<T>
进行专门化?
什么是语法?
是吗
template<>
template<class T>
class Foo<Bar<T>>
{ /**/ };
或
template<class T>
class Foo<Bar<T>>
{ /**/ };
或任何其他语法??
答案 0 :(得分:4)
语法是最后一个:
myapp.controller("DailyController", function($scope) {
$scope.GetDataAndDrawChart = function(data) {
// CommmonApi is my service which is fetching data from database.
$scope.pieData = [{
name: "Microsoft Internet Explorer",
y: 56.33
}, {
name: "Chrome",
y: 24.03,
sliced: true,
selected: true
}, {
name: "Firefox",
y: 10.38
}, {
name: "Safari",
y: 4.77
}, {
name: "Opera",
y: 0.91
}, {
name: "Proprietary or Undetectable",
y: 0.2
}]
}
});