tree name = get_attribute_name (a);
if (is_attribute_p ("strong", name))
{
+ warning (OPT_Wdeprecated, "strong using is deprecated; use inline "
+ "namespaces instead");
if (!toplevel_bindings_p ())
error ("strong using only meaningful at namespace scope");
else if (name_space != error_mark_node)
method denoted by a @samp{->*} or @samp{.*} expression.
* C++ Attributes:: Variable, function, and type attributes for C++ only.
* Function Multiversioning:: Declaring multiple function versions.
-* Namespace Association:: Strong using-directives for namespace association.
* Type Traits:: Compiler support for type traits.
* C++ Concepts:: Improved support for generic programming.
* Deprecated Features:: Things will disappear from G++.
@end table
-See also @ref{Namespace Association}.
-
@node Function Multiversioning
@section Function Multiversioning
@cindex function versions
@uref{http://gcc.gnu.org/wiki/FunctionMultiVersioning, GCC wiki on
Function Multiversioning} for more details.
-@node Namespace Association
-@section Namespace Association
-
-@strong{Caution:} The semantics of this extension are equivalent
-to C++ 2011 inline namespaces. Users should use inline namespaces
-instead as this extension will be removed in future versions of G++.
-
-A using-directive with @code{__attribute ((strong))} is stronger
-than a normal using-directive in two ways:
-
-@itemize @bullet
-@item
-Templates from the used namespace can be specialized and explicitly
-instantiated as though they were members of the using namespace.
-
-@item
-The using namespace is considered an associated namespace of all
-templates in the used namespace for purposes of argument-dependent
-name lookup.
-@end itemize
-
-The used namespace must be nested within the using namespace so that
-normal unqualified lookup works properly.
-
-This is useful for composing a namespace transparently from
-implementation namespaces. For example:
-
-@smallexample
-namespace std @{
- namespace debug @{
- template <class T> struct A @{ @};
- @}
- using namespace debug __attribute ((__strong__));
- template <> struct A<int> @{ @}; // @r{OK to specialize}
-
- template <class T> void f (A<T>);
-@}
-
-int main()
-@{
- f (std::A<float>()); // @r{lookup finds} std::f
- f (std::A<int>());
-@}
-@end smallexample
-
@node Type Traits
@section Type Traits