optional_HAVE_INITIALIZER_LIST is undefined
mattyclarkson opened this issue · 5 comments
mattyclarkson commented
The class declares initialize_list
functions under a optional_CPP11_OR_GREATER
preprocessor block but the header is in a optional_HAVE_INITIALIZER_LIST
block.
We should either:
- Change the
#include
to be wrapped by#if optional_CPP11_OR_GREATER
- Change the declarations of the
initializer_list
functions to be wrapped inoptional_HAVE_INITIALIZER_LIST
and add adefine
foroptional_HAVE_INITIALIZER_LIST
I suspect 2 is wanted.
mattyclarkson commented
Happy to contribute either.
martinmoene commented
Thanks @mattyclarkson
Would there be cases that warrant separating blocks that are now wrapped in optional_CPP11_OR_GREATER
into blocks of optional_CPP11_OR_GREATER
and of optional_HAVE(INITIALIZER_LIST)
?
mattyclarkson commented
I would say not, but the code has a define for initialiser lists so assumed that it was there because there is a reason to have seperate defines.
martinmoene commented
As a note: optional_HAVE( INITIALIZER_LIST )
is currently only used to guard inclusion of
<initializer_list>
.
martinmoene commented
Defined in 096ce6d