求证了下:
printf("%lu %lu %d\n", sizeof(highPriority), sizeof(void*), highPriority);
warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has
type ‘std::_Bit_reference’ [-Wformat=]
16 8 10865696
在STL(某个实现)的源码里:
template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
class vector : protected _Vector_base<_Tp, _Alloc> {
typedef typename _Alloc_traits::reference reference;
StackOverflow('typeid' versus 'typeof' in C++). C++ language has no such thing as typeof. If you are talking about GCC's typeof, then a similar feature is present in C++11 through the keyword decltype.
--
修改:billybear04 FROM 106.121.10.*
FROM 106.121.10.*