6e5d4c2aaa3741f22d34c9058b6ffb78cb5c9a26
[libcds.git] / cds / details / trivial_assign.h
1 //$$CDS-header$$
2
3 #ifndef __CDS_DETAILS_TRIVIAL_ASSIGN_H
4 #define __CDS_DETAILS_TRIVIAL_ASSIGN_H
5
6 #include <cds/details/defs.h>
7
8 //@cond
9 namespace cds { namespace details {
10
11     template <typename Dest, typename Source>
12     struct trivial_assign
13     {
14         Dest& operator()( Dest& dest, const Source& src )
15         {
16             return dest = src;
17         }
18     };
19 }}  // namespace cds::details
20 //@endcond
21
22 #endif // #ifndef __CDS_DETAILS_TRIVIAL_ASSIGN_H