QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#212476#6733. Moniphant SleepZhangYiDeCompile Error//C++208.8kb2023-10-13 16:19:322023-10-13 16:19:32

Details

answer.code: In instantiation of ‘const T* SmallVector<T, MAXN>::begin() const [with T = std::pair<int, Node>; long unsigned int MAXN = 3; SmallVector<T, MAXN>::const_iterator = const std::pair<int, Node>*]’:
answer.code:287:23:   required from here
answer.code:200:42: error: invalid ‘static_cast’ from type ‘const char [60]’ to type ‘void*’
  200 | #define PTR_CAST(Ptr,p) static_cast<Ptr>(static_cast<void*>(p))
      |                                          ^~~~~~~~~~~~~~~~~~~~~
answer.code:224:18: note: in expansion of macro ‘PTR_CAST’
  224 |         { return PTR_CAST(const_iterator,mem); }
      |                  ^~~~~~~~
answer.code: In instantiation of ‘const T* SmallVector<T, MAXN>::end() const [with T = std::pair<int, Node>; long unsigned int MAXN = 3; SmallVector<T, MAXN>::const_iterator = const std::pair<int, Node>*]’:
answer.code:287:46:   required from here
answer.code:200:42: error: invalid ‘static_cast’ from type ‘const char*’ to type ‘void*’
  200 | #define PTR_CAST(Ptr,p) static_cast<Ptr>(static_cast<void*>(p))
      |                                          ^~~~~~~~~~~~~~~~~~~~~
answer.code:226:18: note: in expansion of macro ‘PTR_CAST’
  226 |         { return PTR_CAST(const_iterator,mem+n*sizeof(T)); }
      |                  ^~~~~~~~