This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace adobe { | |
// Precondition: x != T() | |
template <typename T> | |
void test_regular(const T& x) | |
{ | |
assert(x != T()); | |
T y = x; // Copy-construct | |
BOOST_CHECK(x == y); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct annotate { | |
annotate() { cout << "annotate ctor" << endl; } | |
annotate(const annotate&) { cout << "annotate copy-ctor" << endl; } | |
annotate(annotate&&) noexcept { cout << "annotate move-ctor" << endl; } | |
annotate& operator=(const annotate&) { cout << "annotate assign" << endl; return *this; } | |
annotate& operator=(annotate&&) noexcept { cout << "annotate move-assign" << endl; return *this; } |
NewerOlder