Skip to content

Commit

Permalink
Fix for experimental optional with optional #158
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Sep 3, 2018
1 parent 7e724c5 commit a19408c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/CLI/Optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@
// [CLI11:verbatim]
#ifdef __has_include

// You can explicitly enable or disable support
// by defining these to 1 or 0.
#if defined(CLI11_CPP17) && __has_include(<optional>) && \
!defined(CLI11_STD_OPTIONAL)
#define CLI11_STD_OPTIONAL 1
#endif

#if defined(CLI11_CPP14) && __has_include(<experimental/optional>) && \
!defined(CLI11_EXPERIMENTAL_OPTIONAL)
!defined(CLI11_EXPERIMENTAL_OPTIONAL) \
&& (!defined(CLI11_STD_OPTIONAL) || CLI11_STD_OPTIONAL != 0)
#define CLI11_EXPERIMENTAL_OPTIONAL 1
#endif

Expand Down

0 comments on commit a19408c

Please sign in to comment.