template-specialization
Template specialization by another template (of same class)
I\'m writing an array class. This array class can contain again arrays as members. When implementing a printing function, I need specializations.[详细]
2023-04-01 22:03 分类:问答Template specialization with nested unspecialized type
I\'m having trouble working out the syntax for a neste开发者_JS百科d partial template specialization. I think that\'s the right way of putting it anyway. What I want is an as() function which returns[详细]
2023-04-01 03:35 分类:问答In a full specialization, why does inheritance make a forward declaration (without definition) no longer sufficient?
Why is it that in the code below template<typename T> struct Child : public Parent requires a definition, whereas template<typename T> struct Orphan does not require one (but the presence[详细]
2023-03-29 19:30 分类:问答How does boost::lexical_cast take only one template type?
I\'ve looked through the mess that is lexical_cast.hpp and this continues to escape me. How is lexical_cast, whose \'base definition\' takes both a template source and destination, able to accept gra[详细]
2023-03-29 08:06 分类:问答Implement an if/else using TYPO3 templates syntax
Is there a way to to implement IF/ELSE using TYPO3 templates syntax? Here is my template: <div class=\"simi-prof-pic\">[详细]
2023-03-26 20:32 分类:问答C++ Template Specialization problem
I have a syntax similar to this: template <class 开发者_开发百科P> class Foo : public P { public:[详细]
2023-03-26 12:11 分类:问答Is this textbook wrong? Specialising some member functions but not others
I\'m reading Vandevoorde and Josuttis\'s \"C++ Templates The Complete Guide\" (which seems pretty good, by the way). This claim (section 3.3) seems to be wrong and is not in the published errata:[详细]
2023-03-25 11:33 分类:问答Is it OK to inject a specialization into the std namespace?
In this article on defining your own extensions to ::std::error_code the author recommends this code:[详细]
2023-03-25 07:21 分类:问答Template specialization for passing a lambda
I am stuck on specializing a template function for a lambda : class X { public: template <typename T>[详细]
2023-03-25 04:17 分类:问答Should I specialize or overload?
Suppose I have a function template: template <typename T> std::string foo(const T& x) { return some_computation_involving(x);[详细]
2023-03-25 03:11 分类:问答
加载中,请稍侯......