Commit 1868b88
bslma::ManagedPtr: Fix Unit Test Pre-C++17 (#5600)
BSLS_COMPILERFEATURES_GUARANTEED_COPY_ELISION is defined for Clang and
GCC builds prior to C++17 as the compilers do elide the copy, however
they do perform the additional checks that makes the code fail to
compile prior to C++17.
With C++11 and move constructors, the conversion sequence does not
attempt to go through `ManagedPtr(const ManagedPtr&)`, so it
successfully builds even without the new copy-elision rules from C++17.
Update the tests to be predicated on the availability of move
constructors.1 parent 1545cf5 commit 1868b88
1 file changed
Lines changed: 11 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1712 | 1712 | | |
1713 | 1713 | | |
1714 | 1714 | | |
1715 | | - | |
1716 | | - | |
1717 | | - | |
1718 | | - | |
1719 | | - | |
1720 | | - | |
1721 | | - | |
1722 | | - | |
1723 | 1715 | | |
1724 | | - | |
1725 | 1716 | | |
1726 | 1717 | | |
1727 | 1718 | | |
| |||
1736 | 1727 | | |
1737 | 1728 | | |
1738 | 1729 | | |
1739 | | - | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
1740 | 1738 | | |
1741 | 1739 | | |
1742 | 1740 | | |
| |||
13848 | 13846 | | |
13849 | 13847 | | |
13850 | 13848 | | |
13851 | | - | |
| 13849 | + | |
13852 | 13850 | | |
13853 | 13851 | | |
13854 | 13852 | | |
| |||
13866 | 13864 | | |
13867 | 13865 | | |
13868 | 13866 | | |
13869 | | - | |
| 13867 | + | |
13870 | 13868 | | |
13871 | 13869 | | |
13872 | 13870 | | |
| |||
13884 | 13882 | | |
13885 | 13883 | | |
13886 | 13884 | | |
13887 | | - | |
| 13885 | + | |
13888 | 13886 | | |
13889 | 13887 | | |
13890 | 13888 | | |
| |||
0 commit comments