Re: [Boost-bugs] [Boost C++ Libraries] #13211: BOOST_MAY_ALIAS is not always defined and is not documented

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #13211: BOOST_MAY_ALIAS is not always defined and is not documented
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-09-14 17:30:07


#13211: BOOST_MAY_ALIAS is not always defined and is not documented
-------------------------------+--------------------------
  Reporter: viboes | Owner: John Maddock
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: config
   Version: Boost 1.65.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------

Old description:

> The issue comes from the fact that BOOST_MAY_ALIAS is not always defined.
> E.g.
>
> ```
> // Type aliasing hint.
> #if __has_attribute(__may_alias__)
> # define BOOST_MAY_ALIAS __attribute__((__may_alias__))
> #endif
> ```
>
> Wondering if this shouldn't be
>
> ```
> // Type aliasing hint.
> #if __has_attribute(__may_alias__)
> # define BOOST_MAY_ALIAS __attribute__((__may_alias__))
> #else
> # define BOOST_MAY_ALIAS
> #endif
> ```

New description:

 The issue comes from the fact that BOOST_MAY_ALIAS is not always defined.
 E.g.

 {{{
 // Type aliasing hint.
 #if __has_attribute(__may_alias__)
 # define BOOST_MAY_ALIAS __attribute__((__may_alias__))
 #endif

 }}}

 Wondering if this shouldn't be

 {{{
 // Type aliasing hint.
 #if __has_attribute(__may_alias__)
 # define BOOST_MAY_ALIAS __attribute__((__may_alias__))
 #else
 # define BOOST_MAY_ALIAS
 #endif
 }}}

--
Comment (by viboes):
 Humm, I see that we have already this is suffix.hpp
 {{{
 #if !defined(BOOST_MAY_ALIAS)
 #  define BOOST_NO_MAY_ALIAS
 #  define BOOST_MAY_ALIAS
 #endif
 }}}
 So, BOOST_MAY_ALIAS is always defined.
-- 
Ticket URL: <https://svn.boost.org/trac10/boost/ticket/13211#comment:1>
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-09-14 17:36:43 UTC