Re-add constexpr support for newer MSVC versions

This commit is contained in:
Tony Lewis 2020-04-11 18:30:24 +01:00
parent 6b62dcc504
commit e3a2a06011
2 changed files with 13 additions and 9 deletions

View File

@ -109,9 +109,13 @@
# pragma warning( disable : 4284 ) // complaint about return type of # pragma warning( disable : 4284 ) // complaint about return type of
#endif // operator-> not begin a UDT #endif // operator-> not begin a UDT
// Define BOOST_OPS_CONSTEXPR to be like BOOST_CONSTEXPR but empty under MSVC // Define BOOST_OPS_CONSTEXPR to be like BOOST_CONSTEXPR but empty under MSVC < v19.22
#ifdef BOOST_MSVC #ifdef BOOST_MSVC
#if BOOST_MSVC_FULL_VER >= 192200000
#define BOOST_OPS_CONSTEXPR constexpr
#else
#define BOOST_OPS_CONSTEXPR #define BOOST_OPS_CONSTEXPR
#endif
#else #else
#define BOOST_OPS_CONSTEXPR BOOST_CONSTEXPR #define BOOST_OPS_CONSTEXPR BOOST_CONSTEXPR
#endif #endif

View File

@ -500,7 +500,7 @@ const point&lt;float&gt; pi_over_4_normalized = pi_over_4 / length(pi_over_4);
"#ordering">Ordering Note</a>.</td> "#ordering">Ordering Note</a>.</td>
<td>Since <code>C++11</code><br> <td>Since <code>C++11</code><br>
<span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC</a>)</span></td> <span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC &lt; v19.22</a>)</span></td>
</tr> </tr>
<tr> <tr>
@ -520,7 +520,7 @@ const point&lt;float&gt; pi_over_4_normalized = pi_over_4 / length(pi_over_4);
"#ordering">Ordering Note</a>.</td> "#ordering">Ordering Note</a>.</td>
<td>Since <code>C++11</code><br> <td>Since <code>C++11</code><br>
<span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC</a>)</span></td> <span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC &lt; v19.22</a>)</span></td>
</tr> </tr>
<tr> <tr>
@ -534,7 +534,7 @@ const point&lt;float&gt; pi_over_4_normalized = pi_over_4 / length(pi_over_4);
Return convertible to <code>bool</code>.</td> Return convertible to <code>bool</code>.</td>
<td>Since <code>C++11</code><br> <td>Since <code>C++11</code><br>
<span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC</a>)</span></td> <span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC &lt; v19.22</a>)</span></td>
</tr> </tr>
<tr> <tr>
@ -550,7 +550,7 @@ const point&lt;float&gt; pi_over_4_normalized = pi_over_4 / length(pi_over_4);
Return convertible to <code>bool</code>.</td> Return convertible to <code>bool</code>.</td>
<td>Since <code>C++11</code><br> <td>Since <code>C++11</code><br>
<span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC</a>)</span></td> <span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC &lt; v19.22</a>)</span></td>
</tr> </tr>
<tr> <tr>
@ -897,7 +897,7 @@ const point&lt;float&gt; pi_over_4_normalized = pi_over_4 / length(pi_over_4);
"#ordering">Ordering Note</a>.</td> "#ordering">Ordering Note</a>.</td>
<td>Since <code>C++11</code><br> <td>Since <code>C++11</code><br>
<span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC</a>)</span></td> <span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC &lt; v19.22</a>)</span></td>
</tr> </tr>
<tr> <tr>
@ -911,7 +911,7 @@ const point&lt;float&gt; pi_over_4_normalized = pi_over_4 / length(pi_over_4);
"#ordering">Ordering Note</a>.</td> "#ordering">Ordering Note</a>.</td>
<td>Since <code>C++11</code><br> <td>Since <code>C++11</code><br>
<span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC</a>)</span></td> <span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC &lt; v19.22</a>)</span></td>
</tr> </tr>
<tr> <tr>
@ -928,7 +928,7 @@ const point&lt;float&gt; pi_over_4_normalized = pi_over_4 / length(pi_over_4);
"#ordering">Ordering Note</a>.</td> "#ordering">Ordering Note</a>.</td>
<td>Since <code>C++11</code><br> <td>Since <code>C++11</code><br>
<span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC</a>)</span></td> <span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC &lt; v19.22</a>)</span></td>
</tr> </tr>
<tr> <tr>
@ -949,7 +949,7 @@ const point&lt;float&gt; pi_over_4_normalized = pi_over_4 / length(pi_over_4);
"#ordering">Ordering Note</a>.</td> "#ordering">Ordering Note</a>.</td>
<td>Since <code>C++11</code><br> <td>Since <code>C++11</code><br>
<span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC</a>)</span></td> <span style="font-size:small;">(except <a href="https://developercommunity.visualstudio.com/content/problem/414193/rejects-valid-constexpr-marked-friend-function-def.html">MSVC &lt; v19.22</a>)</span></td>
</tr> </tr>
</table> </table>