news 2026/2/8 21:35:19

《拿下C++ 模板进阶!》:带你从模板分类与特点到实战的每一个细节!

作者头像

张小明

前端开发工程师

1.2k 24
文章封面图
《拿下C++ 模板进阶!》:带你从模板分类与特点到实战的每一个细节!
一、详解非类型模版参数
1.1 分类

模板参数分类型形参与非类型形参

类型形参:即出现在模板参数列表中,跟在class或者typename之类的参数类型名称;非类型形参:就是用一个常量作为类(函数)模板的一个参数,在类(函数)模板中可将该参数当成常量来使用。

1.2 演示

代码语言:javascript

AI代码解释

namespace bite { // 定义一个模板类型的静态数组 template<class T, size_t N = 10> class array { public: T& operator[](size_t index) { return _array[index]; } const T& operator[](size_t index)const { return _array[index]; } size_t size()const { return _size; } bool empty()const { return 0 == _size; } private: T _array[N]; size_t _size; }; }
1.3 注意

1、浮点数、类对象以及字符串是不允许作为非类型模板参数的。2、非类型的模板参数必须在编译期就能确认结果。


二、模板的特化
2.1 模板特化概念

通常情况下,使用模板可以实现一些与类型无关的代码,但对于一些特殊类型的可能会得到一些错误的结果,需要特殊处理,比如:实现了一个专门用来进行小于比较的函数模板

注:Less据大多数情况下都可以进行比较,而遇到特殊情况,它就 “失效了” 例如:指针,你所要比较的是指针指向的内容,而Less比较的是指针,固然会 “失效”

此时,就需要对模板进行特化。即:在原模板类的基础上,针对特殊类型所进行特殊化的实现方式。模板特化中分为函数模板特化类模板特化

2.2 函数模板特化
2.2.1 函数模版的特化步骤

1、必须要先有一个基础的函数模板; 2、关键字template后面接一对空的尖括号<>; 3、函数名后跟一对尖括号,尖括号中指定需要特化的类型; 4、函数形参表:必须要和模板函数的基础参数类型完全相同,如果不同编译器可能会报一些奇怪的错误

代码语言:javascript

AI代码解释

// 函数模板 -- 参数匹配 template<class T> bool Less(T left, T right) { return left < right; } // 对Less函数模板进行特化 template<> bool Less<Date*>(Date* left, Date* right) { return *left < *right; } int main() { cout << Less(1, 2) << endl; Date d1(2022, 7, 7); Date d2(2022, 7, 8); cout << Less(d1, d2) << endl; Date* p1 = &d1; Date* p2 = &d2; cout << Less(p1, p2) << endl; // 调用特化之后的版本,而不走模板生成了 return 0; }

注意:一般情况下如果函数模板遇到不能处理或者处理有误的类型,为了实现简单通常都是将该函数直接给出

代码语言:javascript

AI代码解释

bool Less(Date* left, Date* right) { return *left < *right; }

该种实现简单明了,代码的可读性高,容易书写,因为对于一些参数类型复杂的函数模板,特化时特别给出,因此函数模板不建议特化,优先使用重载而不是特化来处理特定类型

2.2.2 函数模板的特点

特点:如果说这里没有特化,就会实例化这个地方的原模版

2.3 类模板特化
2.3.1 全特化

全特化:将模板参数列表中所有的参数都确定化(所有模版都特化)

代码语言:javascript

AI代码解释

template<class T1, class T2> class Data { public: Data() { cout << "Data<T1, T2>" << endl; } private: T1 _d1; T2 _d2; }; template<> class Data<int, char> { public: Data() { cout << "Data<int, char>" << endl; } private: int _d1; char _d2; }; void TestVector() { Data<int, int> d1; Data<int, char> d2; }

如图:

2.3.2 偏特化 / 半特化

偏特化:也叫半特化,即任何针对模版参数进一步进行条件限制设计的特化版本(部分模版都特化)

代码语言:javascript

AI代码解释

template<class T1, class T2> class Data { public: Data() { cout << "Data<T1, T2>" << endl; } private: T1 _d1; T2 _d2; };

如图:

2.3.3 类模板特化应用示例(一):排序特化比较器实现

比如专门用来按照小于比较的类模板Less:

代码语言:javascript

AI代码解释

#include<vector> #include<algorithm> template<class T> struct Less { bool operator()(const T& x, const T& y) const { return x < y; } }; int main() { Date d1(2022, 7, 7); Date d2(2022, 7, 6); Date d3(2022, 7, 8); vector<Date> v1; v1.push_back(d1); v1.push_back(d2); v1.push_back(d3); // 可以直接排序,结果是日期升序 sort(v1.begin(), v1.end(), Less<Date>()); vector<Date*> v2; v2.push_back(&d1); v2.push_back(&d2); v2.push_back(&d3); // 可以直接排序,结果错误日期还不是升序,而v2中放的地址是升序 // 此处需要在排序过程中,让sort比较v2中存放地址指向的日期对象 // 但是走Less模板,sort在排序时实际比较的是v2中指针的地址,因此无法达到预期 sort(v2.begin(), v2.end(), Less<Date*>()); return 0; }

通过观察上述程序的结果发现,对于日期对象可以直接排序,并且结果是正确的。但是如果待排序元素是指针,结果就不一定正确(sort最终按照Less模板中方式比较,所以只会比较指针,而不是比较指针指向空间中内容),此时可以使用类版本特化来处理上述问题

map.hbvieff.cn/Blog/959333.shtml
map.hbvieff.cn/Blog/137131.shtml
map.hbvieff.cn/Blog/115151.shtml
map.hbvieff.cn/Blog/799575.shtml
map.hbvieff.cn/Blog/193713.shtml
map.hbvieff.cn/Blog/571031.shtml
map.hbvieff.cn/Blog/409459.shtml
map.hbvieff.cn/Blog/442360.shtml
map.hbvieff.cn/Blog/221181.shtml
map.hbvieff.cn/Blog/526786.shtml
map.hbvieff.cn/Blog/833887.shtml
map.hbvieff.cn/Blog/150175.shtml
map.hbvieff.cn/Blog/054680.shtml
map.hbvieff.cn/Blog/559553.shtml
map.hbvieff.cn/Blog/355793.shtml
map.hbvieff.cn/Blog/333795.shtml
map.hbvieff.cn/Blog/979177.shtml
map.hbvieff.cn/Blog/337115.shtml
map.hbvieff.cn/Blog/591397.shtml
map.hbvieff.cn/Blog/379193.shtml
map.hbvieff.cn/Blog/971575.shtml
map.hbvieff.cn/Blog/351531.shtml
map.hbvieff.cn/Blog/377515.shtml
map.hbvieff.cn/Blog/399199.shtml
map.hbvieff.cn/Blog/979395.shtml
map.hbvieff.cn/Blog/333339.shtml
map.hbvieff.cn/Blog/519153.shtml
map.hbvieff.cn/Blog/175771.shtml
map.hbvieff.cn/Blog/337531.shtml
map.hbvieff.cn/Blog/139975.shtml
map.hbvieff.cn/Blog/731155.shtml
map.hbvieff.cn/Blog/139371.shtml
map.hbvieff.cn/Blog/117571.shtml
map.hbvieff.cn/Blog/993151.shtml
map.hbvieff.cn/Blog/333195.shtml
map.hbvieff.cn/Blog/759599.shtml
map.hbvieff.cn/Blog/373517.shtml
map.hbvieff.cn/Blog/377959.shtml
map.hbvieff.cn/Blog/999317.shtml
map.hbvieff.cn/Blog/115975.shtml
map.hbvieff.cn/Blog/991113.shtml
map.hbvieff.cn/Blog/133379.shtml
map.hbvieff.cn/Blog/995759.shtml
map.hbvieff.cn/Blog/519971.shtml
map.hbvieff.cn/Blog/393537.shtml
map.hbvieff.cn/Blog/595717.shtml
map.hbvieff.cn/Blog/593553.shtml
map.hbvieff.cn/Blog/159919.shtml
map.hbvieff.cn/Blog/537533.shtml
map.hbvieff.cn/Blog/951159.shtml
map.hbvieff.cn/Blog/793191.shtml
map.hbvieff.cn/Blog/137711.shtml
map.hbvieff.cn/Blog/917519.shtml
map.hbvieff.cn/Blog/353379.shtml
map.hbvieff.cn/Blog/597559.shtml
map.hbvieff.cn/Blog/113775.shtml
map.hbvieff.cn/Blog/599319.shtml
map.hbvieff.cn/Blog/999351.shtml
map.hbvieff.cn/Blog/333115.shtml
map.hbvieff.cn/Blog/577179.shtml
map.hbvieff.cn/Blog/313713.shtml
map.hbvieff.cn/Blog/171371.shtml
map.hbvieff.cn/Blog/395775.shtml
map.hbvieff.cn/Blog/953137.shtml
map.hbvieff.cn/Blog/575171.shtml
map.hbvieff.cn/Blog/175399.shtml
map.hbvieff.cn/Blog/539137.shtml
map.hbvieff.cn/Blog/317517.shtml
map.hbvieff.cn/Blog/999517.shtml
map.hbvieff.cn/Blog/515191.shtml
map.hbvieff.cn/Blog/773179.shtml
map.hbvieff.cn/Blog/739351.shtml
map.hbvieff.cn/Blog/735177.shtml
map.hbvieff.cn/Blog/773391.shtml
map.hbvieff.cn/Blog/535733.shtml
map.hbvieff.cn/Blog/711795.shtml
map.hbvieff.cn/Blog/137911.shtml
map.hbvieff.cn/Blog/533751.shtml
map.hbvieff.cn/Blog/571591.shtml
map.hbvieff.cn/Blog/733317.shtml
map.hbvieff.cn/Blog/531933.shtml
map.hbvieff.cn/Blog/953337.shtml
map.hbvieff.cn/Blog/775737.shtml
map.hbvieff.cn/Blog/371711.shtml
map.hbvieff.cn/Blog/599937.shtml
map.hbvieff.cn/Blog/513531.shtml
map.hbvieff.cn/Blog/331357.shtml
map.hbvieff.cn/Blog/351317.shtml
map.hbvieff.cn/Blog/719117.shtml
map.hbvieff.cn/Blog/951117.shtml
map.hbvieff.cn/Blog/139939.shtml
map.hbvieff.cn/Blog/375579.shtml
map.hbvieff.cn/Blog/977731.shtml
map.hbvieff.cn/Blog/355537.shtml
map.hbvieff.cn/Blog/759151.shtml
map.hbvieff.cn/Blog/173111.shtml
map.hbvieff.cn/Blog/791739.shtml
map.hbvieff.cn/Blog/975951.shtml
map.hbvieff.cn/Blog/177177.shtml
map.hbvieff.cn/Blog/777759.shtml
map.hbvieff.cn/Blog/953393.shtml
map.hbvieff.cn/Blog/151719.shtml
map.hbvieff.cn/Blog/977919.shtml
map.hbvieff.cn/Blog/990456.shtml
map.hbvieff.cn/Blog/937311.shtml
map.hbvieff.cn/Blog/711739.shtml
map.hbvieff.cn/Blog/337177.shtml
map.hbvieff.cn/Blog/351999.shtml
map.hbvieff.cn/Blog/135771.shtml
map.hbvieff.cn/Blog/535391.shtml
map.hbvieff.cn/Blog/957375.shtml
map.hbvieff.cn/Blog/373731.shtml
map.hbvieff.cn/Blog/357995.shtml
map.hbvieff.cn/Blog/379593.shtml
map.hbvieff.cn/Blog/239510.shtml
map.hbvieff.cn/Blog/753157.shtml
map.hbvieff.cn/Blog/773913.shtml
map.hbvieff.cn/Blog/139557.shtml
map.hbvieff.cn/Blog/773593.shtml
map.hbvieff.cn/Blog/779519.shtml
map.hbvieff.cn/Blog/735311.shtml
map.hbvieff.cn/Blog/997173.shtml
map.hbvieff.cn/Blog/155135.shtml
map.hbvieff.cn/Blog/117935.shtml
map.hbvieff.cn/Blog/331119.shtml
map.hbvieff.cn/Blog/335193.shtml
map.hbvieff.cn/Blog/799171.shtml
map.hbvieff.cn/Blog/755373.shtml
map.hbvieff.cn/Blog/933157.shtml
map.hbvieff.cn/Blog/353533.shtml
map.hbvieff.cn/Blog/177979.shtml
map.hbvieff.cn/Blog/359931.shtml
map.hbvieff.cn/Blog/557517.shtml
map.hbvieff.cn/Blog/953737.shtml
map.hbvieff.cn/Blog/555755.shtml
map.hbvieff.cn/Blog/373759.shtml
map.hbvieff.cn/Blog/313139.shtml
map.hbvieff.cn/Blog/331173.shtml
map.hbvieff.cn/Blog/959975.shtml
map.hbvieff.cn/Blog/535315.shtml
map.hbvieff.cn/Blog/739777.shtml
map.hbvieff.cn/Blog/993151.shtml
map.hbvieff.cn/Blog/535555.shtml
map.hbvieff.cn/Blog/195195.shtml
map.hbvieff.cn/Blog/177717.shtml
map.hbvieff.cn/Blog/577117.shtml
map.hbvieff.cn/Blog/513591.shtml
map.hbvieff.cn/Blog/775793.shtml
map.hbvieff.cn/Blog/519591.shtml
map.hbvieff.cn/Blog/337335.shtml
map.hbvieff.cn/Blog/793131.shtml
map.hbvieff.cn/Blog/195317.shtml
map.hbvieff.cn/Blog/133911.shtml
map.hbvieff.cn/Blog/959179.shtml
map.hbvieff.cn/Blog/515379.shtml
map.hbvieff.cn/Blog/797973.shtml
map.hbvieff.cn/Blog/935775.shtml
map.hbvieff.cn/Blog/535159.shtml
map.hbvieff.cn/Blog/775137.shtml
map.hbvieff.cn/Blog/533157.shtml
map.hbvieff.cn/Blog/373513.shtml
map.hbvieff.cn/Blog/335771.shtml
map.hbvieff.cn/Blog/919553.shtml
map.hbvieff.cn/Blog/797157.shtml
map.hbvieff.cn/Blog/197999.shtml
map.hbvieff.cn/Blog/313319.shtml
map.hbvieff.cn/Blog/539737.shtml
map.hbvieff.cn/Blog/795755.shtml
map.hbvieff.cn/Blog/599139.shtml
map.hbvieff.cn/Blog/917579.shtml
map.hbvieff.cn/Blog/151111.shtml
map.hbvieff.cn/Blog/795935.shtml
map.hbvieff.cn/Blog/373311.shtml
map.hbvieff.cn/Blog/317359.shtml
map.hbvieff.cn/Blog/593915.shtml
map.hbvieff.cn/Blog/195131.shtml
map.hbvieff.cn/Blog/911735.shtml
map.hbvieff.cn/Blog/391395.shtml
map.hbvieff.cn/Blog/555593.shtml
map.hbvieff.cn/Blog/559197.shtml
map.hbvieff.cn/Blog/735711.shtml
map.hbvieff.cn/Blog/597153.shtml
map.hbvieff.cn/Blog/959911.shtml
map.hbvieff.cn/Blog/377317.shtml
map.hbvieff.cn/Blog/731919.shtml
map.hbvieff.cn/Blog/151197.shtml
map.hbvieff.cn/Blog/179977.shtml
map.hbvieff.cn/Blog/379755.shtml
map.hbvieff.cn/Blog/913175.shtml
map.hbvieff.cn/Blog/153517.shtml
map.hbvieff.cn/Blog/753175.shtml
map.hbvieff.cn/Blog/133753.shtml
map.hbvieff.cn/Blog/335575.shtml
map.hbvieff.cn/Blog/937513.shtml
map.hbvieff.cn/Blog/739131.shtml
map.hbvieff.cn/Blog/955591.shtml
map.hbvieff.cn/Blog/313173.shtml
map.hbvieff.cn/Blog/539113.shtml
map.hbvieff.cn/Blog/771335.shtml
map.hbvieff.cn/Blog/119737.shtml
map.hbvieff.cn/Blog/357153.shtml
map.hbvieff.cn/Blog/777737.shtml
map.hbvieff.cn/Blog/937373.shtml
map.hbvieff.cn/Blog/797799.shtml
map.hbvieff.cn/Blog/379799.shtml
map.hbvieff.cn/Blog/915359.shtml
map.hbvieff.cn/Blog/111119.shtml
map.hbvieff.cn/Blog/351579.shtml
map.hbvieff.cn/Blog/315715.shtml
map.hbvieff.cn/Blog/135513.shtml
map.hbvieff.cn/Blog/511177.shtml
map.hbvieff.cn/Blog/310623.shtml
map.hbvieff.cn/Blog/795137.shtml
map.hbvieff.cn/Blog/573115.shtml
map.hbvieff.cn/Blog/715115.shtml
map.hbvieff.cn/Blog/337531.shtml
map.hbvieff.cn/Blog/111555.shtml
map.hbvieff.cn/Blog/397393.shtml
map.hbvieff.cn/Blog/791117.shtml
map.hbvieff.cn/Blog/599975.shtml
map.hbvieff.cn/Blog/597795.shtml
map.hbvieff.cn/Blog/131959.shtml
map.hbvieff.cn/Blog/131955.shtml
map.hbvieff.cn/Blog/119557.shtml
map.hbvieff.cn/Blog/911775.shtml
map.hbvieff.cn/Blog/373979.shtml
map.hbvieff.cn/Blog/735315.shtml
map.hbvieff.cn/Blog/915397.shtml
map.hbvieff.cn/Blog/915517.shtml
map.hbvieff.cn/Blog/799779.shtml
map.hbvieff.cn/Blog/511137.shtml
map.hbvieff.cn/Blog/991379.shtml
map.hbvieff.cn/Blog/557931.shtml
map.hbvieff.cn/Blog/355335.shtml
map.hbvieff.cn/Blog/113795.shtml
map.hbvieff.cn/Blog/711579.shtml
map.hbvieff.cn/Blog/995335.shtml
map.hbvieff.cn/Blog/159153.shtml
map.hbvieff.cn/Blog/373735.shtml
map.hbvieff.cn/Blog/373911.shtml
map.hbvieff.cn/Blog/591317.shtml
map.hbvieff.cn/Blog/731957.shtml
map.hbvieff.cn/Blog/195917.shtml
map.hbvieff.cn/Blog/999951.shtml
map.hbvieff.cn/Blog/319951.shtml
map.hbvieff.cn/Blog/775717.shtml
map.hbvieff.cn/Blog/355555.shtml
map.hbvieff.cn/Blog/193757.shtml
map.hbvieff.cn/Blog/353775.shtml
map.hbvieff.cn/Blog/379537.shtml
map.hbvieff.cn/Blog/591511.shtml
map.hbvieff.cn/Blog/557395.shtml
map.hbvieff.cn/Blog/531951.shtml
map.hbvieff.cn/Blog/939151.shtml
map.hbvieff.cn/Blog/579193.shtml
map.hbvieff.cn/Blog/177995.shtml
map.hbvieff.cn/Blog/179975.shtml
map.hbvieff.cn/Blog/157753.shtml
map.hbvieff.cn/Blog/719117.shtml
map.hbvieff.cn/Blog/713751.shtml
map.hbvieff.cn/Blog/355375.shtml
map.hbvieff.cn/Blog/935337.shtml
map.hbvieff.cn/Blog/159513.shtml
map.hbvieff.cn/Blog/717993.shtml
map.hbvieff.cn/Blog/773935.shtml
map.hbvieff.cn/Blog/179999.shtml
map.hbvieff.cn/Blog/393975.shtml
map.hbvieff.cn/Blog/131557.shtml
map.hbvieff.cn/Blog/353951.shtml
map.hbvieff.cn/Blog/511535.shtml
map.hbvieff.cn/Blog/648046.shtml
map.hbvieff.cn/Blog/977573.shtml
map.hbvieff.cn/Blog/151597.shtml
map.hbvieff.cn/Blog/193171.shtml
map.hbvieff.cn/Blog/557391.shtml
map.hbvieff.cn/Blog/296789.shtml
map.hbvieff.cn/Blog/911711.shtml
map.hbvieff.cn/Blog/197191.shtml
map.hbvieff.cn/Blog/955139.shtml
map.hbvieff.cn/Blog/373779.shtml
map.hbvieff.cn/Blog/157151.shtml
map.hbvieff.cn/Blog/265951.shtml
map.hbvieff.cn/Blog/359379.shtml
map.hbvieff.cn/Blog/537551.shtml
map.hbvieff.cn/Blog/557795.shtml
map.hbvieff.cn/Blog/575771.shtml
map.hbvieff.cn/Blog/042373.shtml
map.hbvieff.cn/Blog/313575.shtml
map.hbvieff.cn/Blog/757175.shtml
map.hbvieff.cn/Blog/995375.shtml
map.hbvieff.cn/Blog/335511.shtml
map.hbvieff.cn/Blog/337951.shtml
map.hbvieff.cn/Blog/599139.shtml
map.hbvieff.cn/Blog/915533.shtml
map.hbvieff.cn/Blog/911577.shtml
map.hbvieff.cn/Blog/173117.shtml
map.hbvieff.cn/Blog/357719.shtml
map.hbvieff.cn/Blog/117375.shtml
map.hbvieff.cn/Blog/779559.shtml
map.hbvieff.cn/Blog/955597.shtml
map.hbvieff.cn/Blog/311553.shtml
map.hbvieff.cn/Blog/595197.shtml
map.hbvieff.cn/Blog/133397.shtml
map.hbvieff.cn/Blog/539533.shtml
map.hbvieff.cn/Blog/119797.shtml
map.hbvieff.cn/Blog/151739.shtml
map.hbvieff.cn/Blog/779511.shtml
map.hbvieff.cn/Blog/319119.shtml
map.hbvieff.cn/Blog/579313.shtml
map.hbvieff.cn/Blog/931179.shtml
map.hbvieff.cn/Blog/793779.shtml
map.hbvieff.cn/Blog/719999.shtml
map.hbvieff.cn/Blog/737531.shtml
map.hbvieff.cn/Blog/957931.shtml
map.hbvieff.cn/Blog/515153.shtml
map.hbvieff.cn/Blog/391779.shtml
map.hbvieff.cn/Blog/357335.shtml
map.hbvieff.cn/Blog/753975.shtml
map.hbvieff.cn/Blog/155935.shtml
map.hbvieff.cn/Blog/155113.shtml
map.hbvieff.cn/Blog/573517.shtml
map.hbvieff.cn/Blog/395157.shtml
map.hbvieff.cn/Blog/519175.shtml
map.hbvieff.cn/Blog/677650.shtml
map.hbvieff.cn/Blog/599959.shtml
map.hbvieff.cn/Blog/393793.shtml
map.hbvieff.cn/Blog/793535.shtml
map.hbvieff.cn/Blog/337115.shtml
map.hbvieff.cn/Blog/311357.shtml
map.hbvieff.cn/Blog/533759.shtml
map.hbvieff.cn/Blog/513371.shtml
map.hbvieff.cn/Blog/337555.shtml
map.hbvieff.cn/Blog/791753.shtml
map.hbvieff.cn/Blog/717713.shtml
map.hbvieff.cn/Blog/737195.shtml
map.hbvieff.cn/Blog/554182.shtml
map.hbvieff.cn/Blog/933991.shtml
map.hbvieff.cn/Blog/159133.shtml
map.hbvieff.cn/Blog/577355.shtml
map.hbvieff.cn/Blog/393557.shtml
map.hbvieff.cn/Blog/375733.shtml
map.hbvieff.cn/Blog/957917.shtml
map.hbvieff.cn/Blog/597359.shtml
map.hbvieff.cn/Blog/353357.shtml
map.hbvieff.cn/Blog/195957.shtml
map.hbvieff.cn/Blog/555173.shtml
map.hbvieff.cn/Blog/115351.shtml
map.hbvieff.cn/Blog/513135.shtml
map.hbvieff.cn/Blog/135513.shtml
map.hbvieff.cn/Blog/397977.shtml
map.hbvieff.cn/Blog/311319.shtml
map.hbvieff.cn/Blog/537319.shtml
map.hbvieff.cn/Blog/977391.shtml
map.hbvieff.cn/Blog/991795.shtml
map.hbvieff.cn/Blog/737797.shtml
map.hbvieff.cn/Blog/155539.shtml
map.hbvieff.cn/Blog/579373.shtml
map.hbvieff.cn/Blog/553379.shtml
map.hbvieff.cn/Blog/979551.shtml
map.hbvieff.cn/Blog/551951.shtml
map.hbvieff.cn/Blog/977979.shtml
map.hbvieff.cn/Blog/175517.shtml
map.hbvieff.cn/Blog/335731.shtml
map.hbvieff.cn/Blog/919535.shtml
map.hbvieff.cn/Blog/139913.shtml
map.hbvieff.cn/Blog/137177.shtml
map.hbvieff.cn/Blog/799595.shtml
map.hbvieff.cn/Blog/535713.shtml
map.hbvieff.cn/Blog/971573.shtml
map.hbvieff.cn/Blog/791951.shtml
map.hbvieff.cn/Blog/753779.shtml
map.hbvieff.cn/Blog/793713.shtml
map.hbvieff.cn/Blog/939157.shtml
map.hbvieff.cn/Blog/555391.shtml
map.hbvieff.cn/Blog/951995.shtml
map.hbvieff.cn/Blog/399779.shtml
map.hbvieff.cn/Blog/773159.shtml
map.hbvieff.cn/Blog/317175.shtml
map.hbvieff.cn/Blog/957991.shtml
map.hbvieff.cn/Blog/991719.shtml
map.hbvieff.cn/Blog/997133.shtml
map.hbvieff.cn/Blog/151355.shtml
map.hbvieff.cn/Blog/115315.shtml
map.hbvieff.cn/Blog/371735.shtml
map.hbvieff.cn/Blog/537791.shtml
map.hbvieff.cn/Blog/513551.shtml
map.hbvieff.cn/Blog/159339.shtml
map.hbvieff.cn/Blog/555559.shtml
map.hbvieff.cn/Blog/335795.shtml
map.hbvieff.cn/Blog/333317.shtml
map.hbvieff.cn/Blog/737979.shtml
map.hbvieff.cn/Blog/753795.shtml
map.hbvieff.cn/Blog/113975.shtml
map.hbvieff.cn/Blog/977913.shtml
map.hbvieff.cn/Blog/397797.shtml
map.hbvieff.cn/Blog/171573.shtml
map.hbvieff.cn/Blog/931571.shtml
map.hbvieff.cn/Blog/797779.shtml
map.hbvieff.cn/Blog/915113.shtml
map.hbvieff.cn/Blog/577773.shtml
map.hbvieff.cn/Blog/753135.shtml
map.hbvieff.cn/Blog/191879.shtml
map.hbvieff.cn/Blog/953557.shtml
map.hbvieff.cn/Blog/195919.shtml
map.hbvieff.cn/Blog/557797.shtml
map.hbvieff.cn/Blog/068984.shtml
map.hbvieff.cn/Blog/046874.shtml
map.hbvieff.cn/Blog/751195.shtml
map.hbvieff.cn/Blog/997957.shtml
map.hbvieff.cn/Blog/131733.shtml
map.hbvieff.cn/Blog/513917.shtml
map.hbvieff.cn/Blog/135775.shtml
map.hbvieff.cn/Blog/171397.shtml
map.hbvieff.cn/Blog/597715.shtml
map.hbvieff.cn/Blog/391719.shtml
map.hbvieff.cn/Blog/675493.shtml
map.hbvieff.cn/Blog/027965.shtml
map.hbvieff.cn/Blog/553573.shtml
map.hbvieff.cn/Blog/979159.shtml
map.hbvieff.cn/Blog/959551.shtml
map.hbvieff.cn/Blog/537773.shtml
map.hbvieff.cn/Blog/197757.shtml
map.hbvieff.cn/Blog/537391.shtml
map.hbvieff.cn/Blog/133946.shtml
map.hbvieff.cn/Blog/935212.shtml
map.hbvieff.cn/Blog/175193.shtml
map.hbvieff.cn/Blog/353197.shtml
map.hbvieff.cn/Blog/535773.shtml
map.hbvieff.cn/Blog/553915.shtml
map.hbvieff.cn/Blog/371995.shtml
map.hbvieff.cn/Blog/913951.shtml
map.hbvieff.cn/Blog/208298.shtml
map.hbvieff.cn/Blog/555579.shtml
map.hbvieff.cn/Blog/135591.shtml
map.hbvieff.cn/Blog/153391.shtml
map.hbvieff.cn/Blog/935159.shtml
map.hbvieff.cn/Blog/175377.shtml
map.hbvieff.cn/Blog/799113.shtml
map.hbvieff.cn/Blog/313395.shtml
map.hbvieff.cn/Blog/793115.shtml
map.hbvieff.cn/Blog/758071.shtml
map.hbvieff.cn/Blog/311397.shtml
map.hbvieff.cn/Blog/551975.shtml
map.hbvieff.cn/Blog/175951.shtml
map.hbvieff.cn/Blog/379757.shtml
map.hbvieff.cn/Blog/379197.shtml
map.hbvieff.cn/Blog/731157.shtml
map.hbvieff.cn/Blog/957139.shtml
map.hbvieff.cn/Blog/579575.shtml
map.hbvieff.cn/Blog/557531.shtml
map.hbvieff.cn/Blog/737179.shtml
map.hbvieff.cn/Blog/773319.shtml
map.hbvieff.cn/Blog/741239.shtml
map.hbvieff.cn/Blog/153117.shtml
map.hbvieff.cn/Blog/533191.shtml
map.hbvieff.cn/Blog/975773.shtml
map.hbvieff.cn/Blog/011293.shtml
map.hbvieff.cn/Blog/511139.shtml
map.hbvieff.cn/Blog/911717.shtml
map.hbvieff.cn/Blog/997319.shtml
map.hbvieff.cn/Blog/955313.shtml
map.hbvieff.cn/Blog/593155.shtml
map.hbvieff.cn/Blog/517751.shtml
map.hbvieff.cn/Blog/959519.shtml
map.hbvieff.cn/Blog/579777.shtml
map.hbvieff.cn/Blog/371513.shtml
map.hbvieff.cn/Blog/991151.shtml
map.hbvieff.cn/Blog/371519.shtml
map.hbvieff.cn/Blog/373179.shtml
map.hbvieff.cn/Blog/573735.shtml
map.hbvieff.cn/Blog/573557.shtml
map.hbvieff.cn/Blog/733319.shtml
map.hbvieff.cn/Blog/317192.shtml
map.hbvieff.cn/Blog/646672.shtml
map.hbvieff.cn/Blog/693616.shtml
map.hbvieff.cn/Blog/795339.shtml
map.hbvieff.cn/Blog/993151.shtml
map.hbvieff.cn/Blog/995997.shtml
map.hbvieff.cn/Blog/199975.shtml
map.hbvieff.cn/Blog/955317.shtml
map.hbvieff.cn/Blog/579595.shtml
map.hbvieff.cn/Blog/115763.shtml
map.hbvieff.cn/Blog/197779.shtml
map.hbvieff.cn/Blog/779999.shtml
map.hbvieff.cn/Blog/941041.shtml
map.hbvieff.cn/Blog/373779.shtml
map.hbvieff.cn/Blog/559117.shtml
map.hbvieff.cn/Blog/799195.shtml
map.hbvieff.cn/Blog/917371.shtml
map.hbvieff.cn/Blog/379597.shtml
map.hbvieff.cn/Blog/391191.shtml
map.hbvieff.cn/Blog/177131.shtml
map.hbvieff.cn/Blog/575913.shtml
map.hbvieff.cn/Blog/955599.shtml
map.hbvieff.cn/Blog/757379.shtml
map.hbvieff.cn/Blog/973713.shtml
map.hbvieff.cn/Blog/797131.shtml
map.hbvieff.cn/Blog/119395.shtml
map.hbvieff.cn/Blog/559395.shtml
map.hbvieff.cn/Blog/139515.shtml
map.hbvieff.cn/Blog/771953.shtml
map.hbvieff.cn/Blog/448096.shtml
map.hbvieff.cn/Blog/511577.shtml
map.hbvieff.cn/Blog/997575.shtml
map.hbvieff.cn/Blog/535993.shtml
map.hbvieff.cn/Blog/171317.shtml
map.hbvieff.cn/Blog/775513.shtml
map.hbvieff.cn/Blog/575935.shtml
map.hbvieff.cn/Blog/397173.shtml
map.hbvieff.cn/Blog/719939.shtml
map.hbvieff.cn/Blog/521737.shtml
map.hbvieff.cn/Blog/171191.shtml
map.hbvieff.cn/Blog/571139.shtml
map.hbvieff.cn/Blog/091824.shtml
map.hbvieff.cn/Blog/077852.shtml
map.hbvieff.cn/Blog/193117.shtml
map.hbvieff.cn/Blog/977791.shtml
map.hbvieff.cn/Blog/715676.shtml
map.hbvieff.cn/Blog/337173.shtml
map.hbvieff.cn/Blog/911117.shtml
map.hbvieff.cn/Blog/551933.shtml
map.hbvieff.cn/Blog/155771.shtml
map.hbvieff.cn/Blog/755197.shtml
map.hbvieff.cn/Blog/715353.shtml
map.hbvieff.cn/Blog/339751.shtml
map.hbvieff.cn/Blog/531577.shtml
map.hbvieff.cn/Blog/135777.shtml
map.hbvieff.cn/Blog/553919.shtml
map.hbvieff.cn/Blog/335935.shtml
map.hbvieff.cn/Blog/397731.shtml
map.hbvieff.cn/Blog/759553.shtml
map.hbvieff.cn/Blog/573131.shtml
map.hbvieff.cn/Blog/117153.shtml
map.hbvieff.cn/Blog/593515.shtml
map.hbvieff.cn/Blog/757975.shtml
map.hbvieff.cn/Blog/719539.shtml
map.hbvieff.cn/Blog/195993.shtml
map.hbvieff.cn/Blog/793599.shtml
map.hbvieff.cn/Blog/159937.shtml
map.hbvieff.cn/Blog/155605.shtml
map.hbvieff.cn/Blog/539793.shtml
map.hbvieff.cn/Blog/537113.shtml
map.hbvieff.cn/Blog/799359.shtml
map.hbvieff.cn/Blog/995177.shtml
map.hbvieff.cn/Blog/214598.shtml
map.hbvieff.cn/Blog/355375.shtml
map.hbvieff.cn/Blog/799353.shtml
map.hbvieff.cn/Blog/599931.shtml
map.hbvieff.cn/Blog/975539.shtml
map.hbvieff.cn/Blog/159517.shtml
map.hbvieff.cn/Blog/719117.shtml
map.hbvieff.cn/Blog/117173.shtml
map.hbvieff.cn/Blog/579955.shtml
map.hbvieff.cn/Blog/933993.shtml
map.hbvieff.cn/Blog/313117.shtml
map.hbvieff.cn/Blog/977157.shtml
map.hbvieff.cn/Blog/151559.shtml
map.hbvieff.cn/Blog/957993.shtml
map.hbvieff.cn/Blog/380265.shtml
map.hbvieff.cn/Blog/155113.shtml
map.hbvieff.cn/Blog/311771.shtml
map.hbvieff.cn/Blog/177513.shtml
map.hbvieff.cn/Blog/753391.shtml
map.hbvieff.cn/Blog/197535.shtml
map.hbvieff.cn/Blog/171737.shtml
map.hbvieff.cn/Blog/399333.shtml
map.hbvieff.cn/Blog/579911.shtml
map.hbvieff.cn/Blog/913911.shtml
map.hbvieff.cn/Blog/648956.shtml
map.hbvieff.cn/Blog/915999.shtml
map.hbvieff.cn/Blog/977955.shtml
map.hbvieff.cn/Blog/577731.shtml
map.hbvieff.cn/Blog/117117.shtml
map.hbvieff.cn/Blog/537379.shtml
map.hbvieff.cn/Blog/373113.shtml
map.hbvieff.cn/Blog/997351.shtml
map.hbvieff.cn/Blog/939771.shtml
map.hbvieff.cn/Blog/115355.shtml
map.hbvieff.cn/Blog/111353.shtml
map.hbvieff.cn/Blog/993173.shtml
map.hbvieff.cn/Blog/199715.shtml
map.hbvieff.cn/Blog/157733.shtml
map.hbvieff.cn/Blog/335117.shtml
map.hbvieff.cn/Blog/155777.shtml
map.hbvieff.cn/Blog/951533.shtml
map.hbvieff.cn/Blog/335195.shtml
map.hbvieff.cn/Blog/422947.shtml
map.hbvieff.cn/Blog/975919.shtml
map.hbvieff.cn/Blog/731339.shtml
map.hbvieff.cn/Blog/357777.shtml
map.hbvieff.cn/Blog/652488.shtml
map.hbvieff.cn/Blog/155375.shtml
map.hbvieff.cn/Blog/193959.shtml
map.hbvieff.cn/Blog/319593.shtml
map.hbvieff.cn/Blog/539113.shtml
map.hbvieff.cn/Blog/771117.shtml
map.hbvieff.cn/Blog/521532.shtml
map.hbvieff.cn/Blog/553973.shtml
map.hbvieff.cn/Blog/135333.shtml
map.hbvieff.cn/Blog/197997.shtml
map.hbvieff.cn/Blog/553593.shtml
map.hbvieff.cn/Blog/975591.shtml
map.hbvieff.cn/Blog/315531.shtml
map.hbvieff.cn/Blog/351571.shtml
map.hbvieff.cn/Blog/775791.shtml
map.hbvieff.cn/Blog/397391.shtml
map.hbvieff.cn/Blog/975137.shtml
map.hbvieff.cn/Blog/179771.shtml
map.hbvieff.cn/Blog/733591.shtml
map.hbvieff.cn/Blog/571737.shtml
map.hbvieff.cn/Blog/768791.shtml
map.hbvieff.cn/Blog/038809.shtml
map.hbvieff.cn/Blog/454065.shtml
map.hbvieff.cn/Blog/914605.shtml
map.hbvieff.cn/Blog/828793.shtml
map.hbvieff.cn/Blog/995595.shtml
map.hbvieff.cn/Blog/531399.shtml
map.hbvieff.cn/Blog/337331.shtml
map.hbvieff.cn/Blog/771854.shtml
map.hbvieff.cn/Blog/795571.shtml
map.hbvieff.cn/Blog/625498.shtml
map.hbvieff.cn/Blog/801994.shtml
map.hbvieff.cn/Blog/377195.shtml
map.hbvieff.cn/Blog/311795.shtml
map.hbvieff.cn/Blog/153551.shtml
map.hbvieff.cn/Blog/971571.shtml
map.hbvieff.cn/Blog/711557.shtml
map.hbvieff.cn/Blog/131795.shtml
map.hbvieff.cn/Blog/313571.shtml
map.hbvieff.cn/Blog/955779.shtml
map.hbvieff.cn/Blog/735995.shtml
map.hbvieff.cn/Blog/919977.shtml
map.hbvieff.cn/Blog/959713.shtml
map.hbvieff.cn/Blog/593371.shtml
map.hbvieff.cn/Blog/446874.shtml
map.hbvieff.cn/Blog/355373.shtml
map.hbvieff.cn/Blog/991313.shtml
map.hbvieff.cn/Blog/311911.shtml
map.hbvieff.cn/Blog/711777.shtml
map.hbvieff.cn/Blog/775139.shtml
map.hbvieff.cn/Blog/775975.shtml
map.hbvieff.cn/Blog/979597.shtml
map.hbvieff.cn/Blog/533775.shtml
map.hbvieff.cn/Blog/513517.shtml
map.hbvieff.cn/Blog/753319.shtml
map.hbvieff.cn/Blog/151553.shtml
map.hbvieff.cn/Blog/999777.shtml
map.hbvieff.cn/Blog/159731.shtml
map.hbvieff.cn/Blog/953195.shtml
map.hbvieff.cn/Blog/573517.shtml
map.hbvieff.cn/Blog/157157.shtml
map.hbvieff.cn/Blog/317953.shtml
map.hbvieff.cn/Blog/786579.shtml
map.hbvieff.cn/Blog/137759.shtml
map.hbvieff.cn/Blog/274604.shtml
map.hbvieff.cn/Blog/933559.shtml
map.hbvieff.cn/Blog/537351.shtml
map.hbvieff.cn/Blog/559913.shtml
map.hbvieff.cn/Blog/377791.shtml
map.hbvieff.cn/Blog/917133.shtml
map.hbvieff.cn/Blog/939919.shtml
map.hbvieff.cn/Blog/579391.shtml
map.hbvieff.cn/Blog/379399.shtml
map.hbvieff.cn/Blog/519955.shtml
map.hbvieff.cn/Blog/153955.shtml
map.hbvieff.cn/Blog/951779.shtml
map.hbvieff.cn/Blog/515355.shtml
map.hbvieff.cn/Blog/393513.shtml
map.hbvieff.cn/Blog/919959.shtml
map.hbvieff.cn/Blog/155737.shtml
map.hbvieff.cn/Blog/511391.shtml
map.hbvieff.cn/Blog/719331.shtml
map.hbvieff.cn/Blog/919799.shtml
map.hbvieff.cn/Blog/799771.shtml
map.hbvieff.cn/Blog/399755.shtml
map.hbvieff.cn/Blog/559373.shtml
map.hbvieff.cn/Blog/537739.shtml
map.hbvieff.cn/Blog/351737.shtml
map.hbvieff.cn/Blog/779391.shtml
map.hbvieff.cn/Blog/159533.shtml
map.hbvieff.cn/Blog/159931.shtml
map.hbvieff.cn/Blog/357515.shtml
map.hbvieff.cn/Blog/533393.shtml
map.hbvieff.cn/Blog/793917.shtml
map.hbvieff.cn/Blog/311533.shtml
map.hbvieff.cn/Blog/531393.shtml
map.hbvieff.cn/Blog/155115.shtml
map.hbvieff.cn/Blog/339933.shtml
map.hbvieff.cn/Blog/168237.shtml
map.hbvieff.cn/Blog/757395.shtml

版权声明: 本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!
网站建设 2026/2/8 10:10:11

38、.NET 程序集:别名、加载与命名机制深度解析

.NET 程序集:别名、加载与命名机制深度解析 1. 外部别名(Extern Aliases) 在 C# 编程中,当存在多个同名类型时,C# 通常会使用最近作用域中的类型。例如,本地定义的 System.String 可能会隐藏同名的内置类型。虽然引入这种名称冲突不是明智之举,但 C# 提供了一种机制…

作者头像 李华
网站建设 2026/2/5 8:30:19

43、.NET 中的属性:深入解析与应用

.NET 中的属性:深入解析与应用 1. 属性概述 在 .NET 中,属性(Attributes)可用于为组件、类型及其成员添加注解。属性的主要目的是控制或修改库框架、工具、编译器或公共语言运行时(CLR)的行为。例如,使用 [TestClass] 属性标注的类,会告知单元测试框架该类包含要作…

作者头像 李华
网站建设 2026/2/5 1:14:18

48、.NET 中的序列化与多线程编程详解

.NET 中的序列化与多线程编程详解 1. 序列化机制概述 在数据处理中,当字节和字符串无法满足需求时,.NET 提供了多种序列化机制。这些机制能够自动实现对象在内存中的状态与可输出到磁盘、通过网络传输或其他类似流目标的表示形式之间的映射,并且后续可以将这种表示形式转换…

作者头像 李华
网站建设 2026/2/8 2:47:46

GPT-SoVITS训练中断恢复机制:防止意外断电导致前功尽弃

GPT-SoVITS训练中断恢复机制&#xff1a;防止意外断电导致前功尽弃 在AI语音合成的世界里&#xff0c;最令人崩溃的瞬间莫过于——你已经训练了20小时的模型&#xff0c;显卡风扇轰鸣、进度条缓缓爬升&#xff0c;结果一阵突如其来的跳闸&#xff0c;电脑黑屏。重启后打开终端一…

作者头像 李华
网站建设 2026/2/7 10:45:27

GPT-SoVITS结合ASR实现端到端语音转换系统架构设计

GPT-SoVITS 结合 ASR 实现端到端语音转换系统架构设计 在智能语音交互日益普及的今天&#xff0c;用户不再满足于“能听懂、会说话”的基础能力&#xff0c;而是期待更个性化、更具情感表达的声音体验。传统语音合成系统往往依赖大量标注数据和复杂的流水线工程&#xff0c;部署…

作者头像 李华
网站建设 2026/2/6 0:08:22

GPT-SoVITS模型微调策略:如何在小数据集上获得更好效果

GPT-SoVITS模型微调策略&#xff1a;如何在小数据集上获得更好效果 在智能语音助手、虚拟主播和有声读物日益普及的今天&#xff0c;用户不再满足于“能说话”的机器声音&#xff0c;而是期待更像自己、更懂语境、更能表达情感的个性化语音输出。然而&#xff0c;传统文本到语音…

作者头像 李华