What should be put instead of // 1 for the code to compile and execute successfully? Select all that apply.
enum E { a = 0, b = 1 };
//1
void main()
{
  C<0> c;
  C<a> d = c;  
}
Explanation
enum is converted to int, so template<int> is perfectly valid. The opposite is not true, so an error will occur in template< E > when trying to cast int (namely, number 0) to E.

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Cosmo
Зареєструйся Зараз
або Підпишись на майбутні тести