linux编译警告 will be initialized after

Posted jiu__

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux编译警告 will be initialized after相关的知识,希望对你有一定的参考价值。

这个warning是由于初始化顺序引起的, 
  1. // 会出现warning 的代码!
  2. class cInit
  3. {
  4. public:
  5.     cInit(std::string str, int a) : str_(str), a_(a)
  6.     { }
  7. private:
  8.     int a_;
  9.     std::string str_;
  10. };

 

  1. // OK
  2. class cInit
  3. {
  4. public:
  5.     cInit(std::string str, int a) : str_(str), a_(a)
  6.     { }
  7. private:
  8.     std::string str_;
  9.     int a_;
  10. };

以上是关于linux编译警告 will be initialized after的主要内容,如果未能解决你的问题,请参考以下文章

Git中出现 "LF will be replaced by CRLF" 警告

警告: Application namespace for attribute app:setBackground will be ignored.

编译linux内核时出现"mkimage" command not found - U-Boot images will not be built错误的解决办法

运行报警告UserWarning: Unknown extension is not supported and will be removed warn(msg)

git warning: LF will be replaced by CRLF

去除警告: FutureWarning: In future, it will be treated as `np.float64 == np.dtype(float).type`.