[Boost-bugs] [Boost C++ Libraries] #10844: flyweight: multiple default constructors with real perfect forwarding

Subject: [Boost-bugs] [Boost C++ Libraries] #10844: flyweight: multiple default constructors with real perfect forwarding
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-12-04 10:54:20


#10844: flyweight: multiple default constructors with real perfect forwarding
------------------------------+-----------------------
 Reporter: tore.halvorsen@… | Owner: joaquin
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: flyweight
  Version: Boost 1.57.0 | Severity: Cosmetic
 Keywords: |
------------------------------+-----------------------
 Flyweight gets two default constructors, since it has a direct default
 constructor

 {{{

 flyweight():h(core::insert()){}
 }}}


 and one based on variable template arguments, which can be zero.

 {{{

 #define BOOST_FLYWEIGHT_PERFECT_FWD_CTR_BODY(args) \
   :h(core::insert(BOOST_FLYWEIGHT_FORWARD(args))){}

   BOOST_FLYWEIGHT_PERFECT_FWD_WITH_ARGS(
     explicit flyweight,
     BOOST_FLYWEIGHT_PERFECT_FWD_CTR_BODY)

 #undef BOOST_FLYWEIGHT_PERFECT_FWD_CTR_BODY
 }}}

 which can expand to:

 {{{
 template<typename... Args>
 explicit flyweight(Args&&... args)
 :h(core::insert(std::forward<Args>(args)...)){}
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10844>
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-02-16 18:50:17 UTC