fork download
  1. #include <iostream>
  2. #include <utility>
  3. #include <type_traits>
  4.  
  5. using namespace std;
  6.  
  7. class thing {
  8. public:
  9. int n;
  10. thing () : n(1) { }
  11. thing (thing& x) : n(x.n) { }
  12. thing& operator= (const thing& x) {
  13. n = x.n;
  14. return *this;
  15. }
  16. };
  17.  
  18. using namespace std;
  19.  
  20. int main (void) {
  21. cout << is_copy_assignable<thing>::value << endl;
  22. return 0;
  23. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
1