why const variable can't be assigned to constexpr?

Viewed 113

Why x can't be assigned to c2?

const double x = 65;
constexpr double x1 = 65;
const char x2 = 'A1';

// legal
constexpr char c1 = x1;
constexpr double c3 = x2;

// illegal 
constexpr char c2 = x;
0 Answers
Related