Skip to content

Instantly share code, notes, and snippets.

@elsdrium
Created January 19, 2014 04:05
Show Gist options
  • Save elsdrium/8500378 to your computer and use it in GitHub Desktop.
Save elsdrium/8500378 to your computer and use it in GitHub Desktop.
// x.h: original header
//
#include <iostream>
#include <ostream>
#include <list>
// None of A, B, C, D or E are templates.
// Only A and C have virtual functions.
#include "a.h" // class A
#include "b.h" // class B
#include "c.h" // class C
#include "d.h" // class D
#include "e.h" // class E
class X : public A, private B {
public:
X( const C& );
B f( int, char* );
C f( int, C );
C& g( B );
E h( E );
virtual std::ostream& print( std::ostream& ) const;
private:
std::list<C> clist_;
D d_;
};
inline std::ostream& operator<<( std::ostream& os,
const X& x )
{ return x.print(os); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment