1 /* Copyright 2016-2017 Joaquin M Lopez Munoz.
2 * Distributed under the Boost Software License, Version 1.0.
3 * (See accompanying file LICENSE_1_0.txt or copy at
4 * http://www.boost.org/LICENSE_1_0.txt)
6 * See http://www.boost.org/libs/poly_collection for library home page.
9 #ifndef BOOST_POLY_COLLECTION_ANY_COLLECTION_HPP
10 #define BOOST_POLY_COLLECTION_ANY_COLLECTION_HPP
16 #include <boost/poly_collection/any_collection_fwd.hpp>
17 #include <boost/poly_collection/detail/any_model.hpp>
18 #include <boost/poly_collection/detail/poly_collection.hpp>
23 namespace poly_collection{
25 template<typename Concept,typename Allocator>
27 public common_impl::poly_collection<detail::any_model<Concept>,Allocator>
29 using base_type=common_impl::poly_collection<
30 detail::any_model<Concept>,Allocator>;
32 base_type& base()noexcept{return *this;}
33 const base_type& base()const noexcept{return *this;}
36 using base_type::base_type;
38 any_collection()=default;
39 any_collection(const any_collection& x)=default;
40 any_collection(any_collection&& x)=default;
41 any_collection& operator=(const any_collection& x)=default;
42 any_collection& operator=(any_collection&& x)=default;
44 template<typename C,typename A>
45 friend bool operator==(
46 const any_collection<C,A>&,const any_collection<C,A>&);
49 template<typename Concept,typename Allocator>
51 const any_collection<Concept,Allocator>& x,
52 const any_collection<Concept,Allocator>& y)
54 return x.base()==y.base();
57 template<typename Concept,typename Allocator>
59 const any_collection<Concept,Allocator>& x,
60 const any_collection<Concept,Allocator>& y)
65 template<typename Concept,typename Allocator>
67 any_collection<Concept,Allocator>& x,any_collection<Concept,Allocator>& y)
74 using poly_collection::any_collection;
76 } /* namespace boost */