我们使用的外部库包含以下显式构造函数:
class Chart {
public:
explicit Chart(Chart::Type type, Object *parent);
// ...
};
编译器抱怨以下警告:
chart.h: warning #2305: declaration of 'explicit' constructor
without a single argument is redundant
仅删除explicit
chart.h 中的关键字而不重新编译库以避免警告是否是二进制兼容的?我的感觉是它是安全的,因为explicit
无论如何在这种情况下没有意义。任何人都可以确认吗?