Opened 9 years ago

Last modified 9 years ago

#9570 new Bugs

TTI doesn't support inheritance or at least this is not documented anywhere

Reported by: anonymous Owned by: Edward Diener
Milestone: To Be Determined Component: tti
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

If I didn't know better (not mentioned in TFM) I'd find the behavior of this program very surprising (g++-mp-4.8 -std=c++0x ..., from macports):

#include "boost/tti/has_member_function.hpp"

struct Container {

void func() {}

};

struct Container2 : public Container {

using Container::func; doesn't help

};

typedef Container container_t; ok typedef Container2 container_t; fail

BOOST_TTI_HAS_MEMBER_FUNCTION(func)

static_assert(

has_member_function_func<

container_t, void, boost::mpl::vector<>

::value,

"fail"

);

int main(int, char) { return 0; }

Change History (2)

comment:1 by viboes, 9 years ago

Component: Nonetti
Owner: set to Edward Diener

comment:2 by Edward Diener, 9 years ago

You are right about this. I am working on a method so that inheritance can be supported. I will try to get this implemented in the next release of Boost if it works out. Nonetheless it should be mentioned in the documentation. Thanks for pointing this out.

Note: See TracTickets for help on using tickets.