<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<TITLE>
    CWG Issue 2433</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<STYLE TYPE="text/css">
  INS { text-decoration:none; font-weight:bold; background-color:#A0FFA0 }
  .INS { text-decoration:none; background-color:#D0FFD0 }
  DEL { text-decoration:line-through; background-color:#FFA0A0 }
  .DEL { text-decoration:line-through; background-color: #FFD0D0 }
  @media (prefers-color-scheme: dark) {
    HTML { background-color:#202020; color:#f0f0f0; }
    A { color:#5bc0ff; }
    A:visited { color:#c6a8ff; }
    A:hover, a:focus { color:#afd7ff; }
    INS { background-color:#033a16; color:#aff5b4; }
    .INS { background-color: #033a16; }
    DEL { background-color:#67060c; color:#ffdcd7; }
    .DEL { background-color:#67060c; }
  }
  SPAN.cmnt { font-family:Times; font-style:italic }
</STYLE>
</HEAD>
<BODY>
<P><EM>This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21
  Core Issues List revision 118b.
  See http://www.open-std.org/jtc1/sc22/wg21/ for the official
  list.</EM></P>
<P>2025-09-28</P>
<HR>
<A NAME="2433"></A><H4>2433.
  
Variable templates in the ODR
</H4>
<B>Section: </B>6.3&#160; [<A href="https://wg21.link/basic.def.odr">basic.def.odr</A>]
 &#160;&#160;&#160;

 <B>Status: </B>C++20
 &#160;&#160;&#160;

 <B>Submitter: </B>Richard Smith
 &#160;&#160;&#160;

 <B>Date: </B>2019-10-10<BR>


<P>[Adopted as a DR at the November, 2019 meeting.]</P>

<P>The list of entities in 6.3 [<A href="https://wg21.link/basic.def.odr#12">basic.def.odr</A>] paragraph 12
that can have multiple definitions across translation units does
not, but should, include variable templates.</P>

<P><B>Proposed resolution (October, 2019):</B></P>

<BLOCKQUOTE>

<P>There can be more than one definition of a</P>

<UL>
<LI><P>class type (Clause 11 [<A href="https://wg21.link/class">class</A>]),</P></LI>

<LI><P>enumeration type (9.8.1 [<A href="https://wg21.link/dcl.enum">dcl.enum</A>]),</P></LI>

<LI><P>inline function <INS>or variable</INS>
<DEL>with external linkage</DEL>
(9.2.8 [<A href="https://wg21.link/dcl.inline">dcl.inline</A>]),</P></LI>

<LI><P><DEL>inline variable with external linkage
(9.2.8 [<A href="https://wg21.link/dcl.inline">dcl.inline</A>]),</DEL></P></LI>

<LI><P>
<DEL>class template (Clause 13 [<A href="https://wg21.link/temp">temp</A>]),</DEL>
</P></LI>

<LI><P><DEL>non-static function template
(13.7.7 [<A href="https://wg21.link/temp.fct">temp.fct</A>]),</DEL></P></LI>

<LI><P><DEL>concept (13.7.9 [<A href="https://wg21.link/temp.concept">temp.concept</A>]),</DEL></P></LI>

<LI><P><DEL>static data member of a class template
(13.7.2.5 [<A href="https://wg21.link/temp.static">temp.static</A>]),</DEL></P></LI>

<LI><P><DEL>member function of a class template
(13.7.2.2 [<A href="https://wg21.link/temp.mem.func">temp.mem.func</A>]),</DEL></P></LI>

<LI><P><DEL>template specialization for which some template parameters
are not specified (13.9 [<A href="https://wg21.link/temp.spec">temp.spec</A>],
13.7.6 [<A href="https://wg21.link/temp.spec.partial">temp.spec.partial</A>]),</DEL></P></LI>

<LI><P><INS>templated entity (13.1 [<A href="https://wg21.link/temp.pre">temp.pre</A>]),</INS></P></LI>

<LI><P>default argument for a parameter (for a function in a
given scope), or</P></LI>

<LI><P>default template argument</P></LI>

</UL>

<P>in a program provided that...</P>

</BLOCKQUOTE>

<I>[Drafting note: &#8220;with external linkage&#8221; is
not needed for the </I><TT>inline</TT><I> entities because the
other cases - entities attached to a named module and
multiple definitions in the same translation unit - are
ruled out later in that paragraph.]</I>

<BR><BR>
</BODY>
</HTML>
