specialization
C++, template specialization problem
I am having problems with template class specialization, see the code bellow, please. template <typename T>[详细]
2023-03-03 18:14 分类:问答C++ Function Template, Int Parameter Question
I was curious why this doesn\'t work: const int ASSIGN_LEFT = 1; const int ASSIGN_RIGHT = 2; template <int AssignDirection>[详细]
2023-02-28 21:36 分类:问答explicit specialization of template class member function
I need to specialize template member function for some type (let\'s say double). It works fine while class X itself is not a template class, but when I make it template GCC starts giving compile-time[详细]
2023-02-21 01:53 分类:问答C++ Template specialization on a non-concrete type (another template class!)
I\'m porting some code to use smart pointers in some places, and I ran into an issue with specialization.Specializing a template function on a concrete type is very straightforward, but what if I want[详细]
2023-02-16 01:35 分类:问答overloaded member functions for a particular template specialisation
I have a class tPoint that would be implemented having different base types so template<typename T>class tPoint{[详细]
2023-02-13 10:00 分类:问答Partial specialization of double-templated method fails
There is the template class List. template <typename Point> class List { public: template <const unsigned short N>[详细]
2023-02-09 05:30 分类:问答Specialization of member class nested in a non-specialized class
template <typename T> struct A { template <typename U> struct B; template <> struct B<int> {static const int tag = 1;};// Works fine in VS2010[详细]
2023-02-08 00:38 分类:问答Partial template specialization based on "signed-ness" of integer type?
Given: template<typename T> inline bool f( T n ) { return n >= 0 && n <= 100; } When used with an unsigned type generates a warning:[详细]
2023-02-06 05:17 分类:问答Specializing function template for reference types
Why is the output of this code : #include <iostream> template<typename T> void f(T param) {[详细]
2023-02-04 04:10 分类:问答Member function overloading/template specialization issue
I\'ve been trying to call the overloaded table::scan_index(std::string, ...) member function without success. For the sake of clarity, I have stripped out all non-relevant code.[详细]
2023-02-02 22:04 分类:问答