Re: [Boost-bugs] [Boost C++ Libraries] #13163: boost::detail::heap_new does not have a variadic variant

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13163: boost::detail::heap_new does not have a variadic variant
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-08-22 21:16:23


#13163: boost::detail::heap_new does not have a variadic variant
-------------------------------+----------------------
  Reporter: dean.browning@… | Owner: viboes
      Type: Bugs | Status: assigned
 Milestone: To Be Determined | Component: thread
   Version: Boost 1.64.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+----------------------

Comment (by viboes):

 In addition to your variadic patch I'm ready to provide the up to 9
 version for

 {{{
         template<typename T,typename A1,typename A2,typename A3,typename
 A4>
         inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4)
         {
             return new T(a1,a2,a3,a4);
         }

 }}}

 but not for the mix of const/non-const ref variant

 {{{
         template<typename T,typename A1,typename A2>
         inline T* heap_new(A1 const& a1,A2 const& a2)
         {
             return heap_new_impl<T,A1 const&,A2 const&>(a1,a2);
         }
         template<typename T,typename A1,typename A2>
         inline T* heap_new(A1& a1,A2 const& a2)
         {
             return heap_new_impl<T,A1&,A2 const&>(a1,a2);
         }
         template<typename T,typename A1,typename A2>
         inline T* heap_new(A1 const& a1,A2& a2)
         {
             return heap_new_impl<T,A1 const&,A2&>(a1,a2);
         }
         template<typename T,typename A1,typename A2>
         inline T* heap_new(A1& a1,A2& a2)
         {
             return heap_new_impl<T,A1&,A2&>(a1,a2);
         }
 }}}

 Of course, a patch using preprocessor programming is welcome.

-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13163#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-08-22 21:51:16 UTC