1 // (C) Copyright Eric Friedman 2002.
2 // Use, modification and distribution are subject to the
3 // Boost Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 // MACRO: BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
7 // TITLE: using declaration function overloads from a typename base
8 // DESCRIPTION: The compiler will not accept a using declaration
9 // that brings a function from a typename used as a base class
10 // into a derived class if functions of the same name
11 // are present in the derived class.
13 namespace boost_no_using_declaration_overloads_from_typename_base {
20 template <typename T, typename Base>
21 struct using_overloads_from_typename_base : Base
24 static T f(const T& t) { return t; }
29 using_overloads_from_typename_base<int,base>::f();
30 return using_overloads_from_typename_base<int,base>::f(0);