Opened 13 years ago
Closed 12 years ago
#3824 closed Bugs (invalid)
boost introspection incomplete for user-types
| Reported by: | Owned by: | nasonov | |
|---|---|---|---|
| Milestone: | Boost 1.42.0 | Component: | None | 
| Version: | Boost Development Trunk | Severity: | Problem | 
| Keywords: | introspection | Cc: | 
Description
Given the following structure:
struct B {};
typedef B type_;
struct A {
  type_ name;
};
BOOST_HAS_MEMBER_DATA(type_, name)
If type_ is B result is always false. B* works, as well as integral types. I don't know why it doesn't work because if you try to instantiate a template of given type.
eg, the following compiles fine with type_ = B
template <type_ A::*> struct type{};
type<&A::name>*;
Note: I do not use the typedef shortcut, it is just for exemplary purposes, but substituting the type itself doesn't work either.
Change History (6)
follow-up: 2 comment:1 by , 13 years ago
comment:2 by , 13 years ago
Replying to farago1@…:
Above compiler is MSVC2008. GCC 4.4.1 works correctly. I am downloading MSVC2010 beta now and report on that soon.
MSVC2010 beta doesn't work either.
comment:3 by , 13 years ago
| Component: | any → None | 
|---|
comment:4 by , 12 years ago
I have no BOOST_HAS_MEMBER_DATA. What is the real defect and on which component?
comment:5 by , 12 years ago
probably introspection library in the sandbox. not a boost library and looks abandonded to me.
comment:6 by , 12 years ago
| Resolution: | → invalid | 
|---|---|
| Status: | new → closed | 
Please don't report bugs or new features on components that are not part of Boost.


Above compiler is MSVC2008. GCC 4.4.1 works correctly. I am downloading MSVC2010 beta now and report on that soon.