Skip to content

Commit

Permalink
cut c++17 guards around imports/backports of in-place tags
Browse files Browse the repository at this point in the history
Summary: We have C++17 and C++17 has std::in_place etc.

Reviewed By: ot

Differential Revision: D55038202

fbshipit-source-id: 4922c9c3bef617c3391b84efa8d52857ede3873c
  • Loading branch information
yfeldblum authored and facebook-github-bot committed Mar 22, 2024
1 parent c16b213 commit b8e4bc7
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions folly/Utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ constexpr like_t<Src, Dst>&& forward_like(Dst&& dst) noexcept {
* std::in_place_index
*/

#if FOLLY_CPLUSPLUS >= 201703L

using std::in_place_t;

using std::in_place_type_t;
Expand All @@ -179,29 +177,6 @@ using std::in_place_type;

using std::in_place_index;

#else

struct in_place_t {
explicit in_place_t() = default;
};
FOLLY_INLINE_VARIABLE constexpr in_place_t in_place{};

template <class>
struct in_place_type_t {
explicit in_place_type_t() = default;
};
template <class T>
FOLLY_INLINE_VARIABLE constexpr in_place_type_t<T> in_place_type{};

template <std::size_t>
struct in_place_index_t {
explicit in_place_index_t() = default;
};
template <std::size_t I>
FOLLY_INLINE_VARIABLE constexpr in_place_index_t<I> in_place_index{};

#endif

/**
* Initializer lists are a powerful compile time syntax introduced in C++11
* but due to their often conflicting syntax they are not used by APIs for
Expand Down

0 comments on commit b8e4bc7

Please sign in to comment.