I get the following error when including the DPF header:
In file included from .../vendor/DPF/distrho/DistrhoPlugin.hpp:20,
from .../src/MyPlugin.cpp:1:
.../vendor/DPF/distrho/DistrhoDetails.hpp:750:34: error: the type ‘const DISTRHO::Parameter’ of ‘constexpr’ variable ‘DISTRHO::kParameterBypass’ is not literal
750 | static constexpr const Parameter kParameterBypass = {
| ^~~~~~~~~~~~~~~~
.../vendor/DPF/distrho/DistrhoDetails.hpp:570:8: note: ‘DISTRHO::Parameter’ is not literal because:
570 | struct Parameter {
| ^~~~~~~~~
.../vendor/DPF/distrho/DistrhoDetails.hpp:582:12: note: non-static data member ‘DISTRHO::Parameter::name’ has non-literal type
582 | String name;
| ^~~~
In file included from .../vendor/DPF/distrho/DistrhoDetails.hpp:20:
.../vendor/DPF/distrho/extra/String.hpp:34:7: note: ‘DISTRHO::String’ is not literal because:
34 | class String
| ^~~~~~
.../vendor/DPF/distrho/extra/String.hpp:34:7: note: ‘DISTRHO::String’ does not have ‘constexpr’ destructor
which is quite a good error message from GCC.
$ /usr/bin/c++ --version
c++ (GCC) 13.2.1 20230801
I get the following error when including the DPF header:
which is quite a good error message from GCC.
I am building with these flags:
Although the destructor's non-trivial path calling
std::free()
should never fire, its presence still causes it not to be considered literal.