]>
Commit | Line | Data |
---|---|---|
92f5a8d4 TL |
1 | // Copyright 2018 Andrzej Krzemieński |
2 | // Copyright 2018 Peter Dimov | |
3 | // Distributed under the Boost Software License, Version 1.0. | |
4 | ||
5 | #include <boost/core/swap.hpp> | |
6 | ||
7 | namespace boost | |
8 | { | |
9 | ||
10 | template<class T> struct Wrapper | |
11 | { | |
12 | T value; | |
13 | }; | |
14 | ||
15 | template<class T> inline void swap( Wrapper<T> & w, Wrapper<T> & v ) | |
16 | { | |
17 | boost::swap( w, v ); | |
18 | } | |
19 | ||
20 | } // namespace boost | |
21 | ||
22 | int main() | |
23 | { | |
24 | boost::Wrapper<int> const w = { 2 }; | |
25 | boost::Wrapper<int> const v = { 3 }; | |
26 | ||
27 | swap( w, v ); | |
28 | } |