Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.


BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT — For exposing in classes that inherit from proto::extends<> the overloaded assignment operators defined therein. Unlike the BOOST_PROTO_EXTENDS_USING_ASSIGN() macro, BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT() is for use in non-dependent contexts.


// In header: <boost/proto/extends.hpp>



The standard usage of proto::extends<> is to define a class template that inherits from it. The derived class template automatically gets a compiler-generated assignment operator that hides the ones defined in proto::extends<>. Using BOOST_PROTO_EXTENDS_USING_ASSIGN() in the derived class solves this problem.

However, if the expression extension is an ordinary class and not a class template, the usage of BOOST_PROTO_EXTENDS_USING_ASSIGN() is in a so-called non-dependent context. In plain English, it means it is illegal to use typename in some places where it is required in a class template. In those cases, you should use BOOST_PROTO_EXTENDS_USING_ASSIGN_NON_DEPENDENT() instead.

See also: