martinmoene/optional-lite

optional_HAVE_INITIALIZER_LIST is undefined

mattyclarkson opened this issue · 5 comments

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:

  1. Change the #include to be wrapped by #if optional_CPP11_OR_GREATER
  2. Change the declarations of the initializer_list functions to be wrapped in optional_HAVE_INITIALIZER_LIST and add a define for optional_HAVE_INITIALIZER_LIST

I suspect 2 is wanted.

Happy to contribute either.

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)?

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.

As a note: optional_HAVE( INITIALIZER_LIST ) is currently only used to guard inclusion of
<initializer_list>.

Defined in 096ce6d