C++14 - cppreference.com (original) (raw)

C++14 is a minor version after the major version C++11, featuring mainly minor improvements and defect fixes. Its approval was announced on August 18, 2014. It was released on December 15, 2014.

Before its approval, C++1y is sometimes used to indicate its release in 2010s.

Contents

[edit] New language features

[edit] New library features

[edit] Defect reports

Defect Reports fixed in C++14 (276 core, 158 library)
CWG#129 CWG#223 CWG#240 CWG#292 CWG#312 CWG#332 CWG#342 CWG#344 CWG#388 CWG#462 CWG#482 CWG#483 CWG#496 CWG#535 CWG#539 CWG#565 CWG#577 CWG#583 CWG#597 CWG#616 CWG#623 CWG#631 CWG#675 CWG#712 CWG#729 CWG#739 CWG#755 CWG#903 CWG#912 CWG#974 CWG#975 CWG#977 CWG#1003 CWG#1013 CWG#1024 CWG#1048 CWG#1059 CWG#1093 CWG#1213 CWG#1226 CWG#1227 CWG#1250 CWG#1251 CWG#1260 CWG#1261 CWG#1262 CWG#1264 CWG#1265 CWG#1267 CWG#1268 CWG#1269 CWG#1270 CWG#1275 CWG#1282 CWG#1287 CWG#1288 CWG#1290 CWG#1293 CWG#1295 CWG#1296 CWG#1297 CWG#1298 CWG#1301 CWG#1302 CWG#1305 CWG#1306 CWG#1307 CWG#1308 CWG#1310 CWG#1311 CWG#1312 CWG#1313 CWG#1318 CWG#1320 CWG#1321 CWG#1324 CWG#1327 CWG#1328 CWG#1329 CWG#1330 CWG#1333 CWG#1336 CWG#1340 CWG#1344 CWG#1345 CWG#1346 CWG#1347 CWG#1350 CWG#1352 CWG#1354 CWG#1355 CWG#1357 CWG#1358 CWG#1359 CWG#1361 CWG#1362 CWG#1363 CWG#1364 CWG#1365 CWG#1366 CWG#1367 CWG#1368 CWG#1369 CWG#1370 CWG#1372 CWG#1374 CWG#1375 CWG#1376 CWG#1380 CWG#1381 CWG#1382 CWG#1383 CWG#1385 CWG#1387 CWG#1388 CWG#1392 CWG#1394 CWG#1398 CWG#1399 CWG#1401 CWG#1402 CWG#1405 CWG#1406 CWG#1408 CWG#1409 CWG#1410 CWG#1411 CWG#1412 CWG#1413 CWG#1415 CWG#1416 CWG#1417 CWG#1418 CWG#1423 CWG#1424 CWG#1425 CWG#1428 CWG#1431 CWG#1435 CWG#1437 CWG#1438 CWG#1439 CWG#1440 CWG#1441 CWG#1442 CWG#1447 CWG#1449 CWG#1450 CWG#1453 CWG#1454 CWG#1455 CWG#1456 CWG#1457 CWG#1458 CWG#1460 CWG#1462 CWG#1464 CWG#1466 CWG#1471 CWG#1472 CWG#1473 CWG#1475 CWG#1476 CWG#1477 CWG#1479 CWG#1480 CWG#1481 CWG#1482 CWG#1487 CWG#1489 CWG#1491 CWG#1493 CWG#1494 CWG#1495 CWG#1502 CWG#1503 CWG#1504 CWG#1506 CWG#1507 CWG#1508 CWG#1509 CWG#1510 CWG#1511 CWG#1512 CWG#1514 CWG#1515 CWG#1516 CWG#1522 CWG#1527 CWG#1528 CWG#1531 CWG#1532 CWG#1533 CWG#1535 CWG#1537 CWG#1538 CWG#1539 CWG#1541 CWG#1543 CWG#1544 CWG#1550 CWG#1551 CWG#1553 CWG#1556 CWG#1557 CWG#1559 CWG#1560 CWG#1562 CWG#1563 CWG#1567 CWG#1569 CWG#1570 CWG#1575 CWG#1576 CWG#1579 CWG#1583 CWG#1587 CWG#1588 CWG#1592 CWG#1593 CWG#1595 CWG#1597 CWG#1598 CWG#1601 CWG#1604 CWG#1605 CWG#1607 CWG#1608 CWG#1611 CWG#1612 CWG#1613 CWG#1618 CWG#1629 CWG#1648 CWG#1649 CWG#1658 CWG#1660 CWG#1662 CWG#1664 CWG#1666 CWG#1669 CWG#1673 CWG#1674 CWG#1681 CWG#1684 CWG#1687 CWG#1689 CWG#1690 CWG#1691 CWG#1692 CWG#1693 CWG#1707 CWG#1716 CWG#1717 CWG#1732 CWG#1737 CWG#1738 CWG#1739 CWG#1740 CWG#1741 CWG#1746 CWG#1747 CWG#1759 CWG#1760 CWG#1762 CWG#1764 CWG#1765 CWG#1767 CWG#1769 CWG#1770 CWG#1772 CWG#1773 CWG#1775 CWG#1778 CWG#1786 CWG#1787 LWG#1214 LWG#1450 LWG#2003 LWG#2005 LWG#2009 LWG#2010 LWG#2011 LWG#2012 LWG#2013 LWG#2015 LWG#2018 LWG#2021 LWG#2028 LWG#2033 LWG#2039 LWG#2044 LWG#2045 LWG#2047 LWG#2048 LWG#2049 LWG#2050 LWG#2052 LWG#2054 LWG#2053 LWG#2056 LWG#2057 LWG#2058 LWG#2061 LWG#2064 LWG#2065 LWG#2066 LWG#2067 LWG#2069 LWG#2071 LWG#2074 LWG#2075 LWG#2078 LWG#2080 LWG#2081 LWG#2083 LWG#2085 LWG#2086 LWG#2087 LWG#2091 LWG#2092 LWG#2093 LWG#2094 LWG#2096 LWG#2097 LWG#2098 LWG#2099 LWG#2100 LWG#2102 LWG#2103 LWG#2104 LWG#2105 LWG#2109 LWG#2110 LWG#2112 LWG#2120 LWG#2122 LWG#2123 LWG#2128 LWG#2130 LWG#2132 LWG#2135 LWG#2138 LWG#2140 LWG#2141 LWG#2142 LWG#2143 LWG#2144 LWG#2145 LWG#2147 LWG#2148 LWG#2149 LWG#2150 LWG#2159 LWG#2162 LWG#2163 LWG#2165 LWG#2169 LWG#2172 LWG#2174 LWG#2175 LWG#2176 LWG#2177 LWG#2180 LWG#2182 LWG#2185 LWG#2186 LWG#2187 LWG#2188 LWG#2190 LWG#2193 LWG#2194 LWG#2196 LWG#2197 LWG#2200 LWG#2203 LWG#2205 LWG#2207 LWG#2209 LWG#2210 LWG#2211 LWG#2213 LWG#2222 LWG#2225 LWG#2229 LWG#2231 LWG#2235 LWG#2240 LWG#2246 LWG#2247 LWG#2249 LWG#2252 LWG#2257 LWG#2258 LWG#2263 LWG#2268 LWG#2271 LWG#2272 LWG#2275 LWG#2278 LWG#2280 LWG#2284 LWG#2285 LWG#2288 LWG#2291 LWG#2293 LWG#2298 LWG#2299 LWG#2300 LWG#2301 LWG#2304 LWG#2306 LWG#2308 LWG#2313 LWG#2314 LWG#2315 LWG#2316 LWG#2317 LWG#2320 LWG#2322 LWG#2323 LWG#2324 LWG#2329 LWG#2330 LWG#2332 LWG#2339 LWG#2341 LWG#2344 LWG#2346 LWG#2350 LWG#2356 LWG#2357 LWG#2359 LWG#2360

[edit] Compiler support

[edit] C++14 core language features

| C++14 feature | Paper(s) | GCC | Clang | MSVC | Apple Clang | EDG eccp | Intel C++ | Nvidia HPC C++ (ex PGI)* | Nvidia nvcc | Cray | Embarcadero C++ Builder | IBM Open XL C++ for AIX | IBM Open XL C++ for z/OS | IBM XL C++ | Sun/Oracle C++ | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- | ------------------ | ------------------ | ----------------- | ----------- | -------- | ---------- | ------------------------- | ----------- | ---- | ----------------------- | ----------------------- | ------------------------ | ---------- | -------------- | | | Tweaked wording for contextual conversions | N3323 | 4.9 | 3.4 | 18.0* | Yes | 4.9 | 16.0 | 16.1 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 13.1.2* | 5.15 | | | Binary literals (FTM)* | N3472 | 4.3*4.9 | 2.9 | 19.0 (2015)* | Yes | 4.10 | 11.0 | 2015 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 13.1.2* | 5.14 | | | decltype(auto), Return type deduction for normal functions (FTM)* (FTM)* | N3638 | 4.8 (partial)*4.9 | 3.3 (partial)*3.4 | 19.0 (2015)* | Yes | 4.9 | 15.0 | 16.1 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 13.1.2* | 5.15 | | | Initialized/Generalized lambda captures (init-capture) (FTM)* | N3648 | 4.5 (partial)4.9 | 3.4 | 19.0 (2015)* | Yes | 4.10 | 15.0 | 16.1 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 16.1.1* | 5.15 | | | Generic lambda expressions (FTM)* | N3649 | 4.9 | 3.4 | 19.0 (2015)* | Yes | 4.10 | 16.0 | 16.1 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 13.1.2* | 5.15 | | | Variable templates (FTM)* | N3651 | 5 | 3.4 | 19.0 (Update 2)* | Yes | 4.11 | 17.0 | 17.4 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 13.1.2* | 5.15 | | | Extended constexpr (FTM)* | N3652 | 5 | 3.4 | 19.10* | Yes | 4.11 | 17.0 | 17.4 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 13.1.2* | 5.15 | | | Aggregates with default member initializers (FTM)* | N3653 | 5 | 3.3 | 19.10* | Yes | 4.9 | 16.0 | 16.1 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 16.1.1* | 5.14 | | | Omitting/extending memory allocations | N3664 | N/A | 3.4 | N/A | Yes | N/A | N/A | 17.4 | N/A | 8.6 | 10.3 | 17.1.0 | 1.1.0 | N/A | N/A | | | [[deprecated]] attribute | N3760 | 4.9 | 3.4 | 19.0 (2015)* | Yes | 4.9 | 15.0*16.0 | 16.1 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 13.1.2* | 5.14 | | | Sized deallocation (FTM)* | N3778 | 5 | 3.4 | 19.0 (2015)* | Yes | 4.10.1 | 17.0 | 16.1 | | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 16.1.1* | 5.14 | | | Single quote as digit separator | N3781 | 4.9 | 3.4 | 19.0 (2015)* | Yes | 4.10 | 16.0 | 2015 | 9.0 | 8.6 | 10.3 | 17.1.0 | 1.1.0 | 13.1.2* | 5.14 | | | C++14 feature | Paper(s) | GCC | Clang | MSVC | Apple Clang | EDG eccp | Intel C++ | Nvidia HPC C++ (ex PGI)* | Nvidia nvcc | Cray | Embarcadero C++ Builder | IBM Open XL C++ for AIX | IBM Open XL C++ for z/OS | IBM XL C++ | Sun/Oracle C++ | |

[edit] C++14 library features

| C++14 feature | Paper(s) | GCC libstdc++ | Clang libc++ | MSVC STL | Apple Clang* | IBM Open XL C/C++ for AIX* | Sun/Oracle C++* | Embarcadero C++ Builder* | | | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | --------------- | ------------ | ----------------- | ------------- | --------------------------- | ---------------- | ------------------------- | | | constexpr for | N3302 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | Transparent operator function objects (FTM)* | N3421 | 4.9 | 3.4 | 18.0* | Yes | 17.1.0 | 5.15 | 10.3 | | | std::result_of and SFINAE (FTM)* | N3462 | 5 | Yes | 19.0 (Update 2)* | Yes | 17.1.0 | 5.15 | 10.3 | | | constexpr for | N3469 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | constexpr for | N3470 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | constexpr for <initializer_list>, and | N3471 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | Improved std::integral_constant (FTM)* | N3545 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | User-defined literals for and (FTM)* (FTM)* | N3642 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | Null forward iterators (FTM)* | N3644 | 5 (partial) 10 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | std::quoted (FTM)* | N3654 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | std::make_unique (FTM)* | N3656 | 4.9 | 3.4 | 18.0* | Yes | 17.1.0 | 5.15 | 10.3 | | | Heterogeneous associative lookup (FTM)* | N3657 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | std::integer_sequence (FTM)* | N3658 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | std::shared_timed_mutex | N3659 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | std::exchange (FTM)* | N3668 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | Fixing constexpr member functions without const | N3669 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | Addressing tuples by type: std::get() (FTM)* | N3670 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | Dual-Range std::equal, std::is_permutation, std::mismatch (FTM)* | N3671 | 5 | 3.4 | 19.0 (2015)* | Yes | 17.1.0 | 5.15 | 10.3 | | | Alias templates for transformation traits (FTM)* | N3655 | 4.9 | 3.4 | 18.0* | Yes | | | | | | [User-defined Literals for std::complex](numeric/complex/operator%2522%2522i.html "cpp/numeric/complex/operator""i") (FTM)* | N3779 | 4.9 | 3.4 | 19.0 (2015)* | Yes | | | | | | DR11: std::is_null_pointer (FTM)* | LWG2247 | 4.9 | 3.4 | 19.0 (2015)* | | | | | | | std::is_final (FTM)* | LWG2112 | 5 | 3.4 | 19.0 (2015)* | | | | | | | std::make_reverse_iterator (FTM)* | LWG2285 | 5 | 3.4 | 19.0 (2015)* | | | | | | | std::shared_timed_mutex (FTM)* | N3891 | 4.9 | 3.5 | 19.0 (2015)* | Yes | | | | | | std::tuple_element_t (FTM)* | N3887 | 4.10 | 3.5 | 19.0 (2015)* | Yes | | | | | | C++14 feature | Paper(s) | GCC libstdc++ | Clang libc++ | MSVC STL | Apple Clang* | IBM Open XL C/C++ for AIX* | Sun/Oracle C++* | Embarcadero C++ Builder* | |

* - hover over a cell marked with the star * to see additional pop-up notes.
DR_nn_ - the number nn after "DR" denotes target C++ revision the Defect Report is applied to, e.g., DR20 → C++20.