[Boost-bugs] [Boost C++ Libraries] #9201: CopyConstructible, as a side effect, requires the type to be DefaultConstructible.

Subject: [Boost-bugs] [Boost C++ Libraries] #9201: CopyConstructible, as a side effect, requires the type to be DefaultConstructible.
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-06 12:18:03


#9201: CopyConstructible, as a side effect, requires the type to be
DefaultConstructible.
-------------------------------------------------+-------------------------
 Reporter: David LaÅ¡tovička <david@…> | Owner: jsiek
     Type: Bugs | Status: new
Milestone: To Be Determined | Component:
  Version: Boost Development Trunk | concept_check
 Keywords: concept CopyConstructible | Severity: Problem
  DefaultConstructible Assignable |
-------------------------------------------------+-------------------------
 The last line in the code bellow (i.e. 'TT b;') in fact requires the TT
 type to be DefaultConstructible. In my opinion that is not desired. I
 think that this bug is present also for other concepts (e.g. Assignable).


 {{{
  BOOST_concept(CopyConstructible,(TT))
   {
     BOOST_CONCEPT_USAGE(CopyConstructible) {
       TT a(b); // require copy constructor
       TT* ptr = &a; // require address of operator
       const_constraints(a);
       ignore_unused_variable_warning(ptr);
     }
    private:
     void const_constraints(const TT& a) {
       TT c(a); // require const copy constructor
       const TT* ptr = &a; // require const address of operator
       ignore_unused_variable_warning(c);
       ignore_unused_variable_warning(ptr);
     }
     TT b;
   };
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9201>
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:14 UTC