Indicate lines containing errors:
struct A {
  mutable int a;  // 1
  const mutable int b;  // 2
  const int &c;  // 3
  mutable int &d;  // 4
  static mutable int e;  // 5
  A() : c(a), d(a) {}
};
Explanation
Line // 2 contains an error, because const and mutable specifiers are mutually exclusive.
Line // 4 contains an error, because the mutable specifier does not make sense for class member references (although almost all compilers except clang ignore this :)).
Line // 5 contains an error, because mutable specifier cannot be applied to static class members.

Следи за CodeGalaxy

Мобильное приложение Beta

Get it on Google Play
Обратная Связь
Cosmo
Зарегистрируйся сейчас
или Подпишись на будущие тесты