template-specialization
Explicit specialization after instantiation
I have the following code: typedef vector<int> Vec; typedef vector<Vec> VecOfVec; template<typename Vec>[详细]
2023-04-13 08:02 分类:问答c++ function template specialisation
Given this code: class X { publ开发者_JS百科ic: template< typename T > void func( const T & v );[详细]
2023-04-12 23:41 分类:问答Conversion operator template specialization
Here\'s a largely academic exercise in understanding conversion operators, templates and template specializations.The conversion operator template in the following code works for int, float, and doubl[详细]
2023-04-12 18:04 分类:问答Partial template specialization for initialization of static data members of template classes
How would one initialize static data members of a template class differently for particular parameters?[详细]
2023-04-11 16:05 分类:问答template specialization with multiple template parameters
Say I have this: template<typename T, int X> class foo { public: voi开发者_Go百科d set(const T &t);[详细]
2023-04-10 04:30 分类:问答template specialization for all subclasses
I would like to define a C++ template specialization that applies to all subclasses of a given base class. Is this possible?[详细]
2023-04-10 03:56 分类:问答std::enable_if specialisation failing
I\'ve been messing around with enable_if, and I seem to have stumbled upon some inconsistent behaviour. This is in VS2010. I\'ve reduced it to the following sample.[详细]
2023-04-09 04:12 分类:问答Is it possible to specialize a template definition based on the existence of a nested typedef of a template type parameter?
I have a template, template <typename T> class wrapper, that I would like to specialize based on the existence of typename T::context_type. If typename T::context_type is declared, then the cons[详细]
2023-04-09 01:40 分类:问答Partial template specialization - member specialization
Say I have this开发者_Python百科 template class: template<typename T> class MyClass{ public:[详细]
2023-04-07 12:30 分类:问答How to specialize member of template class with template template parameter
I have a template class with an int and a template te开发者_运维百科mplate parameter. Now I want to specialize a member function:[详细]
2023-04-07 11:41 分类:问答