Boost logo

Boost :

Subject: Re: [boost] [C++0x] The cpp0x branch has been merged into trunk
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-02-25 13:44:05


Hi,
----- Original Message -----
From: "Beman Dawes" <bdawes_at_[hidden]>
To: "Boost Developers List" <boost_at_[hidden]>
Sent: Wednesday, February 25, 2009 7:11 PM
Subject: [boost] [C++0x] The cpp0x branch has been merged into trunk

>
> The cpp0x branch has been merged into trunk, enabling a bunch of
> BOOST_NO_* macros for C++0x feature tests.
>
> This should have no impact on existing code, so be sure to let me know
> if it causes any problems.

What about adding _DELETE and _DEFAULT macros as

#if defined(BOOST_HAS_DELETED_FUNCTIONS)
#define BOOST_COPY_ASSIGNEMENT_DELETE(T) \
  T& operator=(const T&)=delete;
#else
#define BOOST_COPY_ASSIGNEMENT_DELETE(T) \
private: \
  T& operator=(const T&); \
public:

#if defined(BOOST_HAS_DEFAULTED_FUNCTIONS)
    #define BOOST_DEFAULT_CONSTRUCTOR_DEFAULT(T) \
      T()=default; \

    #define BOOST_COPY_ASSIGNEMENT_DEFAULT(T) \
      T& operator=(const T& rhs)=default; \

#else // !defined(BOOST_HAS_DEFAULTED_FUNCTIONS)

    #define BOOST_DEFAULT_CONSTRUCTOR_DEFAULT(T) \
      inline T(){}; \

    #define BOOST_COPY_ASSIGNEMENT_DEFAULT(T) \
      inline T& operator=(const T& rhs) { \
        T tmp(rhs); \
        swap(tmp);\
        return this;\
      }
#endif // !defined(BOOST_HAS_DEFAULTED_FUNCTIONS)

of course we will need to change BOOST_HAS_ by BOOST_NO_ on the attached files.

Best,
Vicente





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk