在boost.DI上看到一个结构体写法以前没有见过,这个结构体中的方法是什么意思?
struct width {
int value;
constexpr operator int() const { return value; }
};
struct height {
int value;
constexpr operator int() const { return value; }
};
class button {
public:
button(width, height); // strong constructor interface
};
button{width{10}, height{15}};
类型转换
附:参考链接