67. constexpr-ii

Question.6

Two developers implement a bitmask calculation:

Developer A -- inline:

inline uint32_t make_mask(int bit) {
   return 1U << bit;
}

Developer B -- constexpr:

constexpr uint32_t make_mask(int bit) {
   return 1U << bit;
}

When called as make_mask(5) where 5 is a literal, what is the difference?

Need Help? Refer to the Quick Guide below

Select Answer