is_base<T, T> is broken on MSVC10 when T is not defined
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the MSVC10 example involving an incomplete class and boost::is_base_of. Read boost/type_traits/is_base_and_derived.hpp and boost/type_traits/is_base_of.hpp, especially the BOOST_IS_BASE_OF path; done means the example compiles without breaking the existing base-of behavior.
Written by the indexing model from the issue text.
Description
Currently on Windows with MSVC10 boost defines BOOST_IS_BASE_OF (which is used in is_base_and_derived, which is used in is_base_of) as follows:
#define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same<T,U>::value)
But microsoft's intrinsic __is_base_of cannot be used with the same type (i.e. T = U) when it (the type) is not defined.
When the following is compiled
class A;
typedef typename boost::is_base_of<A, A>::type x;
you get an error message:
...\include\boost\type_traits\is_base_and_derived.hpp(228) : error C2139: 'A' : an undefined class is not allowed as an argument to compiler intrinsic type trait '__is_base_of'
...\include\boost\type_traits\is_base_of.hpp(29) : see reference to class template instantiation 'boost::detail::is_base_and_derived_impl<B,D>' being compiled
with
[
B=A,
D=A
]
The same code compiles on gcc-4.8.2 and clang-3.6.
Moved from https://svn.boost.org/trac10/ticket/11422
- Dominant language
- C++
- Stars
- 66
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from boostorg/type_traits
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
boostorg/type_traits#205 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
boostorg/type_traits#202 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
boostorg/type_traits#201 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
boostorg/type_traits#196 ·
-
add dependent_false Open
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
boostorg/type_traits#194 · 2 comments ·
All issues in boostorg/type_traits
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
bug-unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/cuda-samples#453 ·