traits
C++ boost template parameter traits
I believe I had seen macro in boost that recovers template template parameters, for example: template<class>[详细]
2023-01-06 01:25 分类:问答A question on traits
What is the difference between following two? 1# trait B extends A { } 2# trait B { self: A => } where A is an abstract class.[详细]
2023-01-05 16:55 分类:问答Implementing an abstract method with a trait, inconsistent compiler behaviour?
I have a base class that comes from a Java library, whose code I cannot modify. This class (A) has an empty method (b) which should have been declared as abstract instead:[详细]
2023-01-05 10:50 分类:问答Algorithm mixing
I have a class that extends Iterator and model an complex algorithm (MyAlgorithm1). Thus, the algorithm can advance step by step through the Next method.[详细]
2023-01-05 08:37 分类:问答C++ Design Question on template types
I have a templated class template <typename T> class MyContainerClass Fortypes to be substituted for T, it has to satisfy many 开发者_Python百科requirements: for example,[详细]
2023-01-01 08:23 分类:问答How to get list of traits that were mixed in the specified class?
And more specific example: abstract trait A trait B extends A trait C extends A How to check what traits that extend trait A (it can be from 0 to many) were mixed in specified c开发者_C百科lass?How[详细]
2022-12-30 08:35 分类:问答Composing independent traits
Given two independent traits: trait T1 { def x = 42 } trait T2 { def x = 0 } If I try to define a class mixing in these two traits like:[详细]
2022-12-29 11:23 分类:问答trait implementation
If I have some traits like: trait A {...} trait B extends A{...} trait C1 extends B{...} trait C2 extends A{...}[详细]
2022-12-28 16:38 分类:问答Restrictions in trait mixing
I want to have classes that can mix only specified traits: class Peter extends Human with Lawful with Evil[详细]
2022-12-28 06:01 分类:问答lambda traits inconsistency across C++0x compilers
I observed some inconsistency between two compilers (g++ 4.5, VS2010 RC) in the way they match lambdas with partial specializations of class templates. I was trying to implement something like boost::[详细]
2022-12-26 21:38 分类:问答