Data dodania Pytanie
2017-06-08 09:06 Overload resolution for multiply inherited operator() »
First, consider this C++ code: #include <stdio.h> struct foo_int { void print(int x) { printf("int %d\n", x); } }; struct...
(3) odpowiedzi
2017-02-23 16:02 Why is it possible to instantiate multiple traits in Scala, but not a single one? »
Let's say we have two traits: trait Trait1 trait Trait2 If I try something like val single = new Trait1 I get an error error: trait Trait1 is abstr...
(1) odpowiedzi
2017-02-20 22:02 Ruby on Rails validation does not show error messages »
My problem is a little related to this question, and the corresponding solution has proved useful and helpful, however there is a little digression fr...
(0) odpowiedzi
2017-01-25 14:01 Concerning Struct Constructor and Destructor behavior - C++ »
I don't understand why the output of this program is as follows. Why isn't there a compilation error? I thought when trying to construct B, the compil...
(2) odpowiedzi
2017-01-04 19:01 Scala - Multiple inheritance with App trait »
Consider two traits, TestTrait1 and TestTrait and assume NewObject extends both. The idea is to make use of variable in TestTrait1 in TestTrait. The b...
(1) odpowiedzi
2016-10-31 23:10 Why does multiple inheritance increase the size of the object despite the bases being empty? »
Given this code: #include <iostream> struct A { }; struct B { }; struct C { }; struct E : A { int field; }; struct F : A, B { i...
(3) odpowiedzi
2016-08-09 12:08 What are the benefits of using interface without any methods ? In php »
AS I was looking at code in Laravel 5 project, I encountered with a class Like below -- class Abc extends Command implements SelfHandling, ShouldBeQu...
(2) odpowiedzi
2016-06-11 20:06 No access or ambiguity check on templated member function found in multiple base classes »
This compiles and runs fine on Visual C++ 2015 Update 3 RC: class A { template <class T> void f() {} }; class B : A {}; class C : A {}; c...
(1) odpowiedzi
2016-04-21 22:04 Diamond of death and Scope resolution operator (c++) »
I have this code (diamond problem): #include <iostream> using namespace std; struct Top { void print() { cout << "Top::print()" <...
(1) odpowiedzi
2015-09-15 08:09 Calling different methods from different traits in scala with multiple inheritance »
Let's take the following example trait Drawable { def draw def paint } trait Cowboy extends Drawable { override def draw() { println("Bang!")...
(1) odpowiedzi
2015-09-13 14:09 Understanding the exposition of Alexandrescu about the weaknesses of multiple inheritance »
UPDATE: I have asked a narrower question here. On pages 6-7 of Modern C++ Design, Andrei Alexandrescu gives a very fundamental discussion of the stre...
(0) odpowiedzi