Skip to content

Build fail regarding Example_C++20 target #3

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

Open
wdhongtw opened this issue Mar 17, 2025 · 0 comments
Open

Build fail regarding Example_C++20 target #3

wdhongtw opened this issue Mar 17, 2025 · 0 comments

Comments

@wdhongtw
Copy link

wdhongtw commented Mar 17, 2025

There is a error when trying to build entire solution in Visual Studio.

...\JSLikePromise\Examples_C++20\example04.hpp(20,26): error C3688: invalid literal suffix 'ms'; literal operator or literal operator template 'operator ""ms' not found

Because the header <chrono> is not included explicitly.

diff --git a/Examples_C++20/example04.hpp b/Examples_C++20/example04.hpp
index 429c2b2..daa1d35 100644
--- a/Examples_C++20/example04.hpp
+++ b/Examples_C++20/example04.hpp
@@ -1,3 +1,5 @@
+#include <chrono>
+
 shared_ptr<PromiseState<int>> example04_promiseState;
 
 Promise<int> ex04_resolveAfter1Sec() {

(Or include the header from exmaples.cpp beforehand, if simplicity is important here. :D)

Not a big problem sine that is an error for helper target.
But it will be good to fix it so user won't need to investigate this when trying to pull and build the project. :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant