This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3 PATCH] Implement P0504R0 (Revisiting in-place tag types for any/optional/variant).


On 12/11/16 21:24 +0200, Ville Voutilainen wrote:
+  inline in_place_t in_place{};
+
+  template<typename _Tp> struct in_place_type_t
+  {
+    explicit in_place_type_t() = default;
+  };
+
+  template<typename _Tp>
+    in_place_type_t<_Tp> in_place_type{};
+
+  template<size_t _Idx> struct in_place_index_t
+  {
+    explicit in_place_index_t() = default;
+  };
+
+  template<size_t _Idx>
+    in_place_index_t<_Idx> in_place_index{};

I was told there's a Core issue that says these are not actually
inline variables unless they say "inline". Not sure which issue that
is, but G++ does the right thing and makes them globally unique,
rather than having internal linkage.

(At LWG's request P0504R0 marked them inline just to be safe.)

OK for trunk, thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]