You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
board: ESP32 Wrover Module
ESP32 2.0.9
Arduino IDE 2.1.0
Ran and compiled both examples without change.
Got below errors for ltr_329als_simple, and about half these errors for compile_test:
In file included from c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als.h:26,
from C:\Users\palmi\AppData\Local\Temp\.arduinoIDE-unsaved202361-15128-cx8egz.w2q3\ltr_329als_simple\ltr_329als_simple.ino:16:
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h: In member function 'constexpr Mcci_Ltr_329als_Regs::AlsContr_t& Mcci_Ltr_329als_Regs::AlsContr_t::setValue(uint8_t, uint8_t) const':
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:247:65: error: assignment of member 'Mcci_Ltr_329als_Regs::AlsContr_t::m_value' in read-only object
this->m_value = fieldset(fmask, this->m_value, value);
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:248:20: error: binding reference of type 'Mcci_Ltr_329als_Regs::AlsContr_t&' to 'const Mcci_Ltr_329als_Regs::AlsContr_t' discards qualifiers
return *this;
^~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:249:13: error: body of 'constexpr' function 'constexpr Mcci_Ltr_329als_Regs::AlsContr_t& Mcci_Ltr_329als_Regs::AlsContr_t::setValue(uint8_t, uint8_t) const' not a return-statement
}
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h: In member function 'constexpr Mcci_Ltr_329als_Regs::AlsMeasRate_t& Mcci_Ltr_329als_Regs::AlsMeasRate_t::setValue(uint8_t, uint8_t) const':
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:348:65: error: assignment of member 'Mcci_Ltr_329als_Regs::AlsMeasRate_t::m_value' in read-only object
this->m_value = fieldset(fmask, this->m_value, value);
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:349:20: error: binding reference of type 'Mcci_Ltr_329als_Regs::AlsMeasRate_t&' to 'const Mcci_Ltr_329als_Regs::AlsMeasRate_t' discards qualifiers
return *this;
^~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:350:13: error: body of 'constexpr' function 'constexpr Mcci_Ltr_329als_Regs::AlsMeasRate_t& Mcci_Ltr_329als_Regs::AlsMeasRate_t::setValue(uint8_t, uint8_t) const' not a return-statement
}
^
In file included from c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als.h:26,
from C:\Users\palmi\AppData\Local\Temp\.arduinoIDE-unsaved202361-15128-cx8egz.w2q3\ltr_329als_simple\ltr_329als_simple.ino:16:
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h: In member function 'constexpr Mcci_Ltr_329als_Regs::PartID_t& Mcci_Ltr_329als_Regs::PartID_t::setValue(uint8_t, uint8_t) const':
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:481:65: error: assignment of member 'Mcci_Ltr_329als_Regs::PartID_t::m_value' in read-only object
this->m_value = fieldset(fmask, this->m_value, value);
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:482:20: error: binding reference of type 'Mcci_Ltr_329als_Regs::PartID_t&' to 'const Mcci_Ltr_329als_Regs::PartID_t' discards qualifiers
return *this;
^~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:483:13: error: body of 'constexpr' function 'constexpr Mcci_Ltr_329als_Regs::PartID_t& Mcci_Ltr_329als_Regs::PartID_t::setValue(uint8_t, uint8_t) const' not a return-statement
}
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h: In member function 'constexpr Mcci_Ltr_329als_Regs::ManufacID_t& Mcci_Ltr_329als_Regs::ManufacID_t::setValue(uint8_t, uint8_t) const':
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:525:65: error: assignment of member 'Mcci_Ltr_329als_Regs::ManufacID_t::m_value' in read-only object
this->m_value = fieldset(fmask, this->m_value, value);
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:526:20: error: binding reference of type 'Mcci_Ltr_329als_Regs::ManufacID_t&' to 'const Mcci_Ltr_329als_Regs::ManufacID_t' discards qualifiers
return *this;
^~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:527:13: error: body of 'constexpr' function 'constexpr Mcci_Ltr_329als_Regs::ManufacID_t& Mcci_Ltr_329als_Regs::ManufacID_t::setValue(uint8_t, uint8_t) const' not a return-statement
}
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h: In member function 'constexpr Mcci_Ltr_329als_Regs::AlsStatus_t& Mcci_Ltr_329als_Regs::AlsStatus_t::setValue(uint8_t, uint8_t) const':
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:570:65: error: assignment of member 'Mcci_Ltr_329als_Regs::AlsStatus_t::m_value' in read-only object
this->m_value = fieldset(fmask, this->m_value, value);
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:571:20: error: binding reference of type 'Mcci_Ltr_329als_Regs::AlsStatus_t&' to 'const Mcci_Ltr_329als_Regs::AlsStatus_t' discards qualifiers
return *this;
^~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:572:13: error: body of 'constexpr' function 'constexpr Mcci_Ltr_329als_Regs::AlsStatus_t& Mcci_Ltr_329als_Regs::AlsStatus_t::setValue(uint8_t, uint8_t) const' not a return-statement
}
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h: In member function 'constexpr Mcci_Ltr_329als_Regs::AlsStatus_t& Mcci_Ltr_329als_Regs::AlsStatus_t::setNew(bool) const':
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:608:20: error: binding reference of type 'Mcci_Ltr_329als_Regs::AlsStatus_t&' to 'const Mcci_Ltr_329als_Regs::AlsStatus_t' discards qualifiers
return *this;
^~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:609:13: error: body of 'constexpr' function 'constexpr Mcci_Ltr_329als_Regs::AlsStatus_t& Mcci_Ltr_329als_Regs::AlsStatus_t::setNew(bool) const' not a return-statement
}
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h: In static member function 'static constexpr float Mcci_Ltr_329als_Regs::DataRegs_t::luxComputation(uint16_t, uint16_t, uint32_t, uint32_t)':
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:745:13: error: body of 'constexpr' function 'static constexpr float Mcci_Ltr_329als_Regs::DataRegs_t::luxComputation(uint16_t, uint16_t, uint32_t, uint32_t)' not a return-statement
}
^
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h: At global scope:
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:805:60: error: non-constant condition for static assertion
static_assert(DataRegs_t::luxComputation(0, 0, 1, 100) == 0.0, "lux computation is wrong");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:805:45: error: 'static constexpr float Mcci_Ltr_329als_Regs::DataRegs_t::luxComputation(uint16_t, uint16_t, uint32_t, uint32_t)' called in a constant expression
static_assert(DataRegs_t::luxComputation(0, 0, 1, 100) == 0.0, "lux computation is wrong");
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:806:63: error: non-constant condition for static assertion
static_assert(DataRegs_t::luxComputation(50, 100, 1, 100) != 0.0, "lux computation is wrong");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:806:45: error: 'static constexpr float Mcci_Ltr_329als_Regs::DataRegs_t::luxComputation(uint16_t, uint16_t, uint32_t, uint32_t)' called in a constant expression
static_assert(DataRegs_t::luxComputation(50, 100, 1, 100) != 0.0, "lux computation is wrong");
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:807:62: error: non-constant condition for static assertion
static_assert(DataRegs_t::luxComputation(100, 0, 1, 100) == 177.43f, "lux computation is wrong");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:807:45: error: 'static constexpr float Mcci_Ltr_329als_Regs::DataRegs_t::luxComputation(uint16_t, uint16_t, uint32_t, uint32_t)' called in a constant expression
static_assert(DataRegs_t::luxComputation(100, 0, 1, 100) == 177.43f, "lux computation is wrong");
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:808:65: error: non-constant condition for static assertion
static_assert(DataRegs_t::luxComputation(1000, 100, 4, 200) == 235.6112366f, "lux computation is wrong");
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
c:\Users\palmi\Documents\Arduino\libraries\MCCI_LTR-329ALS\src/mcci_ltr_329als_regs.h:808:45: error: 'static constexpr float Mcci_Ltr_329als_Regs::DataRegs_t::luxComputation(uint16_t, uint16_t, uint32_t, uint32_t)' called in a constant expression
static_assert(DataRegs_t::luxComputation(1000, 100, 4, 200) == 235.6112366f, "lux computation is wrong");
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
exit status 1
Compilation error: exit status 1
The text was updated successfully, but these errors were encountered:
Needs investigation; obviously, the constexpr semantics in this compiler are different than in the compiler we use. @dhineshkumarmcci, let's not make changes without a discussion; the approach has got to be different based on the nature of the portability problem.
board: ESP32 Wrover Module
ESP32 2.0.9
Arduino IDE 2.1.0
Ran and compiled both examples without change.
Got below errors for ltr_329als_simple, and about half these errors for compile_test:
The text was updated successfully, but these errors were encountered: