Question.5
A developer creates a compile-time configuration:
struct PinConfig { uint8_t port; uint8_t pin; constexpr PinConfig(uint8_t pt, uint8_t pn) : port(pt), pin(pn) {} }; constexpr PinConfig LED_PIN(2, 5);
When is LED_PIN constructed?
LED_PIN
Select Answer
At runtime during startup
At compile time -- the constexpr constructor creates the object during compilation; the binary contains the literal values in Flash
At link time
Depends on optimization level