parallel101 / parallel101/course

print.h 没有包含头文件 cstdint

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
4.2k
Forks
556
PR merge metrics
No merged PRs in 30d

Description

我的gcc版本是 13.3.0,使用print.h和cppdemangle.h时遇到了print.h少包含头文件的问题,如下

In file included from main.cpp:2:
print.h: In function ‘std::ostream& _print_details::operator<<(std::ostream&, const print_adaptor<T, >&&)’:
print.h:312:64: error: ‘uintptr_t’ does not name a type
312 | os << "[object 0x" << std::hex << reinterpret_cast<uintptr_t>(
| ^~~~~~~~~
print.h:10:1: note: ‘uintptr_t’ is defined in header ‘’; did you forget to ‘#include ’?
9 | #include
+++ |+#include
10 | // #include

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open print.h around the include list near line 10 and the uintptr_t use around line 312. Reproduce the reported compilation with GCC 13.3.0 and the stated print.h/cppdemangle.h usage; done when the example compiles without the missing-type error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.