Skip to content

Conversation

@jwnimmer-tri
Copy link
Contributor

Closes #4.

In some cases, optional.hpp and variant.hpp still could not be included
in the same translation unit:

(1) If the user included variant.hpp first and optional.hpp second and
if <variant> was available, we'd see duplicate inplace_t and inplace.

(2) If the user included optional.hpp first and variant.hpp second and
if <optional> was available, we'd see duplicate inplace_t and inplace.

(3) If the user included optional.hpp first and variant.hpp second and
if <optional> was not available, we'd see duplicate in_place_type_t,
in_place_type, in_place_index_t, and in_place_index.

This improves on 6da04dc.

This is similar to the fix proposed in #8, but goes a step further and removes the in_place_type_t and in_place_index_t from optional.hpp -- they are not related to using optional (only variant and any), and when we're using <optional> or <experimental/optional> they were not being aliased anyway, so they were only conditionally provided by stx. It seemed better to remove them, instead of trying to make them play nice with variant.hpp.

In some cases, optional.hpp and variant.hpp still could not be included
in the same translation unit:

(1) If the user included variant.hpp first and optional.hpp second and
if <variant> was available, we'd see duplicate inplace_t and inplace.

(2) If the user included optional.hpp first and variant.hpp second and
if <optional> was available, we'd see duplicate inplace_t and inplace.

(3) If the user included optional.hpp first and variant.hpp second and
if <optional> was not available, we'd see duplicate in_place_type_t,
in_place_type, in_place_index_t, and in_place_index.

This improves on 6da04dc.
@jwnimmer-tri
Copy link
Contributor Author

I'm no longer using stx (I'm C++17-only now, yay!), so I'll close this out.

@jwnimmer-tri jwnimmer-tri deleted the in_place_t branch October 29, 2019 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

in_place_t / in_place_type / etc. failing to compile

1 participant