First public contribution.
1 //-----------------------------------------------------------------------------
2 // boost-libs variant/libs/test/class_a.h header file
3 // See http://www.boost.org for updates, documentation, and revision history.
4 //-----------------------------------------------------------------------------
7 // Eric Friedman, Itay Maman
9 // Distributed under the Boost Software License, Version 1.0. (See
10 // accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
13 #ifndef _CLASSA_H_INC_
14 #define _CLASSA_H_INC_
16 #include <algorithm> // for std::swap
25 class_a(int n = 5511);
26 class_a(const class_a& other);
28 class_a& operator=(const class_a& rhs);
29 void swap(class_a& other);
39 std::ostream& operator<<(std::ostream& strm, const class_a& a);
44 assert(self_p_ == this);
47 class_a::class_a(int n)
53 class_a::class_a(const class_a& other)
60 class_a& class_a::operator=(const class_a& rhs)
68 void class_a::swap(class_a& other)
70 std::swap(n_, other.n_);
73 int class_a::get() const
78 std::ostream& operator<<(std::ostream& strm, const class_a& a)
80 return strm << "class_a(" << a.get() << ")";
83 #endif //_CLASSA_H_INC_