libstdc++-10 std::allocator pointer removed
- Dominant language
- C++
- Stars
- 1.8k
- Forks
- 342
- PR merge metrics
- No merged PRs in 30d
Description
I'm getting a build error at bslstl_bitset.t.cpp:1140
ASSERTV(LINE, (X.to_string,
native_std::allocator >() == s));
It took a long time to debug, but I have some info for you: That code tries to get typename std::allocator::pointer.
See [/usr/include/c++/10/bits/allocator.h:115](https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/allocator.h#L115)
```cpp
template
class allocator : public __allocator_base<_Tp>
{
public:
typedef _Tp value_type;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
#if __cplusplus <= 201703L
typedef _Tp* pointer;
typedef const _Tp* const_pointer;
typedef _Tp& reference;
typedef const _Tp& const_reference;
template
struct rebind
{ typedef allocator<_Tp1> other; };
#endif
```
pointer removed!
Possible I need to change my BDE cmake stuff to support libstdc++-10 with a 2020 __cplusplus macro.
Please advise.
Contributor guide
Research direction
Reproduce the build error at bslstl_bitset.t.cpp:1140 with libstdc++-10, then inspect the referenced allocator.h behavior and the BDE CMake configuration for the C++ standard. Compare the test's use of std::allocator::pointer with the selected __cplusplus setting; done means the test builds and runs successfully with libstdc++-10.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, cpp
- Domain
- build-system, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100