diff --git a/entrypoint.sh b/entrypoint.sh old mode 100755 new mode 100644 diff --git a/testdata/test.cpp b/testdata/test.cpp index 308af3e..1bb4efc 100644 --- a/testdata/test.cpp +++ b/testdata/test.cpp @@ -1,5 +1,6 @@ // aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa // +#include #include "test.hpp" #include @@ -13,9 +14,24 @@ class Hoge int m_a; }; +// https://github.com/yohhoy/cpp-longest-identifier/wiki +bool longest_identifier() +{ + std::atomic x(3); + + int expected = 3; + const bool result = std::atomic_compare_exchange_strong_explicit(&x, &expected, 2, + std::memory_order_acquire, + std::memory_order_acquire); + + std::cout << std::boolalpha << result << " " << x.load() << " " << expected << std::endl; + return result; +} + int main(int, const char**) { Hoge hoge(42); + longest_identifier(); std::cout << hoge.getA() << std::endl; return 0; }