Boost C++ Libraries: Ticket #11840: New is_complex<T> failing with const types https://svn.boost.org/trac10/ticket/11840 <p> I would like to report a change in behavior for the new version of the type_traits in Boost 1.60.0 (b1). </p> <p> When the type is <code></code><code>const std::complex&lt;T&gt;</code><code></code>, the traits return false. This is different between 1.58.0 and the current 1.60.0b1 </p> <p> Example: </p> <div class="wiki-code"><div class="code"><pre><span class="k">template</span> <span class="o">&lt;</span><span class="k">typename</span> <span class="n">T</span><span class="o">&gt;</span> <span class="kt">void</span> <span class="n">mycheck</span><span class="p">()</span> <span class="p">{</span> <span class="k">if</span> <span class="p">(</span><span class="n">boost</span><span class="o">::</span><span class="n">is_complex</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">())</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;COMPLEX&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span> <span class="k">else</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="s">&quot;REAL&quot;</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span> <span class="p">}</span> <span class="kt">int</span> <span class="n">main</span> <span class="p">()</span> <span class="p">{</span> <span class="n">mycheck</span><span class="o">&lt;</span><span class="kt">float</span><span class="o">&gt;</span><span class="p">();</span> <span class="c1">// REAL</span> <span class="n">mycheck</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span><span class="p">();</span> <span class="c1">// REAL</span> <span class="n">mycheck</span><span class="o">&lt;</span><span class="kt">int</span><span class="o">&gt;</span><span class="p">();</span> <span class="c1">// REAL</span> <span class="n">mycheck</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">complex</span><span class="o">&lt;</span><span class="kt">float</span><span class="o">&gt;</span> <span class="o">&gt;</span><span class="p">();</span> <span class="c1">// COMPLEX</span> <span class="n">mycheck</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">complex</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span> <span class="o">&gt;</span><span class="p">();</span> <span class="c1">// COMPLEX</span> <span class="n">mycheck</span><span class="o">&lt;</span><span class="n">std</span><span class="o">::</span><span class="n">complex</span><span class="o">&lt;</span><span class="k">const</span> <span class="kt">double</span><span class="o">&gt;</span> <span class="o">&gt;</span><span class="p">();</span> <span class="c1">// COMPLEX</span> <span class="n">mycheck</span><span class="o">&lt;</span><span class="k">const</span> <span class="n">std</span><span class="o">::</span><span class="n">complex</span><span class="o">&lt;</span><span class="kt">double</span><span class="o">&gt;</span> <span class="o">&gt;</span><span class="p">();</span> <span class="c1">// COMPLEX in 1.58.0, REAL in 1.60.0_b1</span> <span class="p">}</span> </pre></div></div> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11840 Trac 1.4.3 hehn@… Fri, 11 Dec 2015 10:24:39 GMT cc set https://svn.boost.org/trac10/ticket/11840#comment:1 https://svn.boost.org/trac10/ticket/11840#comment:1 <ul> <li><strong>cc</strong> <span class="trac-author">hehn@…</span> added </li> </ul> Ticket John Maddock Fri, 11 Dec 2015 17:33:26 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11840#comment:2 https://svn.boost.org/trac10/ticket/11840#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Fixed via <a class="ext-link" href="https://github.com/boostorg/type_traits/pull/22"><span class="icon">​</span>https://github.com/boostorg/type_traits/pull/22</a> </p> Ticket