<!DOCTYPE html><htmllang='en'><head><title>[qty.unit.sym.fmt]</title><metacharset='UTF-8'/><linkrel='stylesheet'type='text/css'href='14882.css'/><linkrel='stylesheet'type='text/css'href='https://fonts.googleapis.com/css2?family=Noto+Serif'/><linkrel='stylesheet'type='text/css'href='https://fonts.googleapis.com/css2?family=Noto+Sans'/><linkrel='stylesheet'type='text/css'href='https://fonts.googleapis.com/css2?family=Noto+Sans+Mono'/><linkrel='icon'href='icon.png'/><linkrel='stylesheet'type='text/css'href='expanded.css'title='Normal'/><linkrel='alternate stylesheet'type='text/css'href='colored.css'title='Notes and examples colored'/><linkrel='alternate stylesheet'type='text/css'href='normative-only.css'title='Notes and examples hidden'/></head><body><divclass='wrapper'><h1><aclass='secnum'style='min-width:50pt'>5</a> Quantities and units library <aclass='abbr_ref'href='index.html#quantities'>[quantities]</a></h1><h2><aclass='secnum'style='min-width:65pt'>5.4</a> Reference <aclass='abbr_ref'href='qty.ref.html#qty.unit.sym.fmt'>[qty.ref]</a></h2><h3><aclass='secnum'style='min-width:80pt'>5.4.4</a> Unit <aclass='abbr_ref'href='qty.unit.html#sym.fmt'>[qty.unit]</a></h3><h4><aclass='secnum'style='min-width:95pt'>5.4.4.10</a> Symbol formatting <aclass='abbr_ref'>[qty.unit.sym.fmt]</a></h4><divclass='texpara'><divid='lib:Unit,unit_symbol_to'><divid='lib:unit_symbol_to,Unit'><divclass='itemdecl'><divclass='marginalizedparent'><aclass='itemDeclLink'href='#lib:unit_symbol_to,Unit'>🔗</a></div><codeclass='itemdeclcode'><spanclass='keyword'>template</span><spanclass='anglebracket'><</span><spanclass='keyword'>typename</span> CharT <spanclass='operator'>=</span><spanclass='keyword'>char</span>, std<spanclass='operator'>::</span>output_iterator<spanclass='anglebracket'><</span>CharT<spanclass='anglebracket'>></span> Out, <ahref='qty.unit.concepts.html#concept:Unit'title='5.4.4.4 Concepts [qty.unit.concepts]'><spanid='conceptref:Unit'><spanclass='texttt'>Unit</span></span></a> U<spanclass='anglebracket'>></span>
<spanclass='keyword'>constexpr</span> Out unit_symbol_to<spanclass='parenthesis'>(</span>Out out, U u, <spanclass='keyword'>const</span> unit_symbol_formatting<spanclass='operator'>&</span> fmt <spanclass='operator'>=</span><spanclass='curlybracket'>{</span><spanclass='curlybracket'>}</span><spanclass='parenthesis'>)</span>;
</code></div></div></div></div><divclass='para'id='3'><divclass='marginalizedparent'><aclass='marginalized'href='#3'>3</a></div><divclass='itemdescr'><divclass='sourceLinkParent'><aclass='sourceLink'href='https://github.com/mpusz/mp-units329ffdaacb1bd7bed08565ac80d9eef7ccb1e5b5/source/quantities.tex#L3335'>#</a></div><divclass='texpara'><divid='3.sentence-1'class='sentence'><i>Effects</i>: Equivalent to: