This means that, if a QuadProg++ user uses C++17, she cannot include the header QuadProg++/QuadProg++.hh in her codes in a standard way. To ignore register by overriding it, she may need to write something like:
before she includes the header file, which is awkward.
I think there are two ways to solve this problem:
Remove register from the public header files.
Add the macro above before the first register appears.
I suggest taking the former solution because it is often said that the register keyword is likely to be ignored by recent compilers (they could optimize codes better than humans).
Note that having register in .cc files is fine as it can be compiled using older C++. So I leave it as it is.
Variable declaration with the
register
keyword was deprecated in C++11 and removed in C++17. https://en.cppreference.com/w/cpp/language/storage_durationThis means that, if a QuadProg++ user uses C++17, she cannot include the header
QuadProg++/QuadProg++.hh
in her codes in a standard way. To ignoreregister
by overriding it, she may need to write something like:before she includes the header file, which is awkward.
I think there are two ways to solve this problem:
register
from the public header files.register
appears.I suggest taking the former solution because it is often said that the
register
keyword is likely to be ignored by recent compilers (they could optimize codes better than humans).Note that having
register
in.cc
files is fine as it can be compiled using older C++. So I leave it as it is.