Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util.h文件中的模板函数format #67

Closed
Pyolar opened this issue Jun 7, 2024 · 3 comments · Fixed by #79
Closed

util.h文件中的模板函数format #67

Pyolar opened this issue Jun 7, 2024 · 3 comments · Fixed by #79
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Pyolar
Copy link

Pyolar commented Jun 7, 2024

微信图片_20240607164345
是不是没用到格式化字符串,后面调用myAssert的时候输出的是不是就只有可变长度的参数信息,而不是包含格式化字符串以及可变长度的参数

@578223592
Copy link
Collaborator

@Pyolar 抱歉回复的晚。

这段代码写的时候应该参考了printf函数的实现。

后面调用myAssert的时候输出的是不是就只有可变长度的参数信息,而不是包含格式化字符串以及可变长度的参数

调用myAssert的时候输出是格式化完毕后的字符串,你可以改写代码尝试一下

@Pyolar
Copy link
Author

Pyolar commented Jun 21, 2024

@578223592
微信图片_20240621093133
在clion上运行这个函数,输出的也不是格式化完毕的字符串,难道我调用的有问题吗

@578223592
Copy link
Collaborator

@Pyolar 看起来代码是有问题的,没有正确的格式化。
非常感谢提出这个问题。
如果有时间,也欢迎提交一个pr来修正这个问题。

@578223592 578223592 added bug Something isn't working good first issue Good for newcomers labels Jun 22, 2024
beanljun added a commit to beanljun/KVstorageBaseRaft-cpp that referenced this issue Jul 29, 2024
@578223592 578223592 linked a pull request Aug 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants