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_FUNCTION_COLLECTION_HPP
10 #define BOOST_POLY_COLLECTION_FUNCTION_COLLECTION_HPP
16 #include <boost/poly_collection/function_collection_fwd.hpp>
17 #include <boost/poly_collection/detail/function_model.hpp>
18 #include <boost/poly_collection/detail/poly_collection.hpp>
23 namespace poly_collection{
25 template<typename Signature,typename Allocator>
26 class function_collection:
27 public common_impl::poly_collection<
28 detail::function_model<Signature>,Allocator>
30 using base_type=common_impl::poly_collection<
31 detail::function_model<Signature>,Allocator>;
33 base_type& base()noexcept{return *this;}
34 const base_type& base()const noexcept{return *this;}
37 using base_type::base_type;
39 function_collection()=default;
40 function_collection(const function_collection& x)=default;
41 function_collection(function_collection&& x)=default;
42 function_collection& operator=(const function_collection& x)=default;
43 function_collection& operator=(function_collection&& x)=default;
45 template<typename S,typename A>
46 friend bool operator==(
47 const function_collection<S,A>&,const function_collection<S,A>&);
50 template<typename Signature,typename Allocator>
52 const function_collection<Signature,Allocator>& x,
53 const function_collection<Signature,Allocator>& y)
55 return x.base()==y.base();
58 template<typename Signature,typename Allocator>
60 const function_collection<Signature,Allocator>& x,
61 const function_collection<Signature,Allocator>& y)
66 template<typename Signature,typename Allocator>
68 function_collection<Signature,Allocator>& x,
69 function_collection<Signature,Allocator>& y)
76 using poly_collection::function_collection;
78 } /* namespace boost */