Why can't struct screen not initialize the frame struct properly?
What I want is to initialize the screen struct and directly initialize the 2 frame structs as well.
#include <iostream>
#include <sstream>
#include <cstring>
#define ESC "\033"
struct frame {
public:
frame(unsigned int w, unsigned int h) :
m_w(w),
m_h(h) {}
private:
unsigned int m_w, m_h;
};
struct screen {
public:
template<typename ... Args>
screen(Args && ... args0, Args && ... args1) :
m_f0(std::forward<Args>(args0)...),
m_f1(std::forward<Args>(args1)...) {}
private:
frame m_f0, m_f1;
};
int main() {
frame f = {16, 16};
screen s = {f, {16, 16}};
return 0;
}