chronoxor / cppcommon Goto Github PK
View Code? Open in Web Editor NEWCross-platform C++ common library for Linux, OSX, Windows, Cygwin, MinGW
License: MIT License
Cross-platform C++ common library for Linux, OSX, Windows, Cygwin, MinGW
License: MIT License
Hi @chronoxor Thank you for providing us this library.
But unfortunately got issue when compiling under alpine (using Docker):
nginx:stable_alpine
https://hub.docker.com/layers/library/nginx/stable-alpine/images/sha256-5bc90c961f2ef45c7ed6057e5c55e09d5f6b700a9d2e7e824c5e3709f329a61d?context=explore
I have install libexecinfo-dev so it has execinfo.h
but:
in function CppCommon::StackTrace::StackTrace(int)': stack_trace.cpp:(.text+0x419): undefined reference to
backtrace'
is there any solution for building under alpine ?
Thank You very much
where is the build folder?
CppCommon::Path path{ "CppApp.log.bak" };
CppCommon::File file(path);
file.Open(true, true);
if (file.IsFileOpened())
{
char buf[1024]{};
size_t read = file.Read(buf, CppCommon::countof(buf));
auto offset = file.offset();
CPPLOG_INFO("file offset: {}", offset);
file.Write("@@@@@", 5);
file.Flush();
offset = file.offset();
CPPLOG_INFO("file offset: {}", offset);
}
the output:
2023-11-03 15:10:57.219+08 0x00004658 INFO : file offset: 4477 [console.cpp,153 main
2023-11-03 15:10:57.243+08 0x00004658 INFO : file offset: 7935 [console.cpp,157 main
Thie file size is 4477 bytes.
When read 1024 bytes, 4477 bytes were read into the 8K buffer, offset is 4477, it's the file end position.
When write "@@@@@" and flush, 4477-1024+5=3458 bytes were written, the new offset is 4477+3458=7935.
The remain read buffer is also written.
To avoid the problem, Seek should be called before Write, but documention doesn't say that.
Maybe Read and Write should use diffrent buffers?
Since without #18 this lib does not compile with gcc >=10 or clang >=12 we need to create a new release of the conan package.
Because releases for conan are bound to git tags, there wont be one until you create a new one here.
Are there any plans for creating a new release tag soon?
Please use commit id - b9ab5c8836bbffbe0a877f64d6faef8fbf4fd394 to fix the failing build
An error occurs when building from Conan with the gcc 11.1.0 compiler.
Add #include <mutex>
in filecache.cpp, pls.
[ 1%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/algorithms/token_bucket.cpp.o
[ 5%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/common/reader.cpp.o
[ 5%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/common/uint128.cpp.o
[ 7%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/common/uint256.cpp.o
[ 8%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/cache/filecache.cpp.o
[ 10%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/common/writer.cpp.o
[ 12%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/errors/exceptions.cpp.o
[ 14%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/errors/exceptions_handler.cpp.o
[ 15%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/errors/fatal.cpp.o
[ 17%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/errors/system_error.cpp.o
[ 19%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/filesystem/directory.cpp.o
[ 21%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/filesystem/directory_iterator.cpp.o
[ 22%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/filesystem/exceptions.cpp.o
[ 24%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/filesystem/file.cpp.o
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp: In member function ‘bool CppCommon::FileCache::emplace(std::string&&, std::string&&, const CppCommon::Timespan&)’:
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:15:10: error: ‘unique_lock’ is not a member of ‘std’
15 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:10:1: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
9 | #include "cache/filecache.h"
+++ |+#include <mutex>
10 |
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:15:39: error: expected primary-expression before ‘>’ token
15 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:15:41: error: ‘locker’ was not declared in this scope
15 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp: In member function ‘bool CppCommon::FileCache::insert(const string&, const string&, const CppCommon::Timespan&)’:
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:36:10: error: ‘unique_lock’ is not a member of ‘std’
36 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:36:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:36:39: error: expected primary-expression before ‘>’ token
36 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:36:41: error: ‘locker’ was not declared in this scope
36 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp: In member function ‘bool CppCommon::FileCache::remove(const string&)’:
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:82:10: error: ‘unique_lock’ is not a member of ‘std’
82 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:82:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:82:39: error: expected primary-expression before ‘>’ token
82 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:82:41: error: ‘locker’ was not declared in this scope
82 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp: In member function ‘bool CppCommon::FileCache::insert_path(const CppCommon::Path&, const string&, const CppCommon::Timespan&, const InsertHandler&)’:
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:113:10: error: ‘unique_lock’ is not a member of ‘std’
113 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:113:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:113:39: error: expected primary-expression before ‘>’ token
113 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:113:41: error: ‘locker’ was not declared in this scope
113 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp: In member function ‘bool CppCommon::FileCache::remove_path_internal(const CppCommon::Path&)’:
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:198:10: error: ‘unique_lock’ is not a member of ‘std’
198 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:198:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:198:39: error: expected primary-expression before ‘>’ token
198 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:198:41: error: ‘locker’ was not declared in this scope
198 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp: In member function ‘void CppCommon::FileCache::clear()’:
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:217:10: error: ‘unique_lock’ is not a member of ‘std’
217 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:217:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:217:39: error: expected primary-expression before ‘>’ token
217 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:217:41: error: ‘locker’ was not declared in this scope
217 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp: In member function ‘void CppCommon::FileCache::watchdog(const CppCommon::UtcTimestamp&)’:
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:228:10: error: ‘unique_lock’ is not a member of ‘std’
228 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:228:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:228:39: error: expected primary-expression before ‘>’ token
228 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:228:41: error: ‘locker’ was not declared in this scope
228 | std::unique_lock<std::shared_mutex> locker(_lock);
| ^~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp: In member function ‘void CppCommon::FileCache::swap(CppCommon::FileCache&)’:
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:275:10: error: ‘unique_lock’ is not a member of ‘std’
275 | std::unique_lock<std::shared_mutex> locker1(_lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:275:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:275:39: error: expected primary-expression before ‘>’ token
275 | std::unique_lock<std::shared_mutex> locker1(_lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:275:41: error: ‘locker1’ was not declared in this scope
275 | std::unique_lock<std::shared_mutex> locker1(_lock);
| ^~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:276:10: error: ‘unique_lock’ is not a member of ‘std’
276 | std::unique_lock<std::shared_mutex> locker2(cache._lock);
| ^~~~~~~~~~~
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:276:10: note: ‘std::unique_lock’ is defined in header ‘<mutex>’; did you forget to ‘#include <mutex>’?
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:276:39: error: expected primary-expression before ‘>’ token
276 | std::unique_lock<std::shared_mutex> locker2(cache._lock);
| ^
/home/saracen/.conan/data/cppcommon/cci.20201104/_/_/build/99276d8d948e85a220af9d98560d454705748a4a/source_subfolder/source/cache/filecache.cpp:276:41: error: ‘locker2’ was not declared in this scope
276 | std::unique_lock<std::shared_mutex> locker2(cache._lock);
| ^~~~~~~
[ 26%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/filesystem/path.cpp.o
[ 28%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/filesystem/symlink.cpp.o
make[2]: *** [source_subfolder/CMakeFiles/cppcommon.dir/build.make:90: source_subfolder/CMakeFiles/cppcommon.dir/source/cache/filecache.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:155: source_subfolder/CMakeFiles/cppcommon.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Hey there!
I have experienced a bug using CppTrader, on Ubuntu 20.04.3 LTS (GNU/Linux 5.11.0-1022-aws aarch64). It's severe but very easy to fix. Most compilers interprets 'char' as 'signed char' but gcc in this ubuntu for some reason interprets it as 'unsigned char' by default.
Therefore, function std::pair BinTreeAVL::insert(const const_iterator&, T&) at bintree_avl.inl:266 under some circumstances can stuck in endless loop because it tries to compare 'balance' variable with '-1' and always fails.
Fix is simple, replace line at bintree_avl.h:122 with 'signed char balance;'.
I did this in my local copy and it fixed the issue.
I also suggest to check other algos for this bug if there are similar structures.
It'll be very helpful if some versioning scheme is added.
In our present use case, just some git tags would suffice.
btw, great work you're doing here!
Helo.
I'm packaging CppCommon into https://conan.io/center/
Conan is a package manager for C/C++ and the Conan Center is a central repository for recipes. They have a extensive pipeline that exercise the packaging of the library in many different platforms (72, in the case of CppCommon).
I'm getting some errors in libc++, clang, linux, x64 builds. For instance:
Scanning dependencies of target cppcommon
[ 1%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/algorithms/token_bucket.cpp.o
[ 3%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/cache/filecache.cpp.o
[ 5%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/common/reader.cpp.o
[ 7%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/common/uint128.cpp.o
[ 9%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/common/uint256.cpp.o
[ 11%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/common/writer.cpp.o
[ 13%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/errors/exceptions.cpp.o
[ 15%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/errors/exceptions_handler.cpp.o
[ 16%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/errors/fatal.cpp.o
[ 18%] Building CXX object source_subfolder/CMakeFiles/cppcommon.dir/source/errors/system_error.cpp.o
/home/conan/w/cci_PR-3224/.conan/data/cppcommon/1.0.0.0/_/_/build/fc39b1f2e79622c2440e5473052f70419217b467/source_subfolder/source/errors/exceptions_handler.cpp:640:5: error: static_assert failed "ExceptionsHandler::StorageAlign must be adjusted!"
static_assert((alignof(Impl) == StorageAlign), "ExceptionsHandler::StorageAlign must be adjusted!");
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
All of them seem to be on exceptions_handler.cpp:640:5
. Some other build logs can be found in this github comment.
My goal is to pack CppServer as a Conan recipe, but before it's better to make CppCommon available.
I'm also proposing a fix: #7 but I thought it would be clearer to highlight the issue here.
On musl based systems we have three issues to overcome:
alpinebuilder:/usr/src/fbe/bin# ./fbe-tests
===============================================================================
All tests passed (1003987 assertions in 45 test cases)
I can provide a pull requests if the changes are deemed worthy.
CppCommon/include/containers/list.inl:16:9: error: use of undeclared identifier 'PushBack'
Hi,
Could you please release a new version, when you feel it's more or less stable?
I'd like to package if for conan-center.
Thanks,
Alex
/usr/local/include/system/uuid.inl: In constructor 'constexpr CppCommon::UUID::UUID(const char*, size_t)':
/usr/local/include/system/uuid.inl:65:1: error: member 'CppCommon::UUID::_data' must be initialized by mem-initializer in 'constexpr' constructor
I'm trying to build your another project and I had a problem with compiling. It
home/bagrat/proj/games/virus-game/fbe-compiler/modules/CppCommon/source/threads/thread.cpp: In static member function ‘static void CppCommon::Thread::Yield()’:
/home/bagrat/proj/games/virus-game/fbe-compiler/modules/CppCommon/source/threads/thread.cpp:148:18: error: ‘int pthread_yield()’ is deprecated: pthread_yield is deprecated, use sched_yield instead [-Werror=deprecated-declarations]
148 | pthread_yield();
| ~~~~~~~~~~~~~^~
In file included from /usr/include/features.h:484,
from /usr/include/x86_64-linux-gnu/c++/11/bits/os_defines.h:39,
from /usr/include/x86_64-linux-gnu/c++/11/bits/c++config.h:586,
from /usr/include/c++/11/string:38,
from /home/bagrat/proj/games/virus-game/fbe-compiler/modules/CppCommon/include/errors/system_error.h:12,
from /home/bagrat/proj/games/virus-game/fbe-compiler/modules/CppCommon/include/errors/exceptions.h:12,
from /home/bagrat/proj/games/virus-game/fbe-compiler/modules/CppCommon/include/filesystem/exceptions.h:12,
from /home/bagrat/proj/games/virus-game/fbe-compiler/modules/CppCommon/include/errors/exceptions_handler.h:12,
from /home/bagrat/proj/games/virus-game/fbe-compiler/modules/CppCommon/include/threads/thread.h:12,
from /home/bagrat/proj/games/virus-game/fbe-compiler/modules/CppCommon/source/threads/thread.cpp:9:
/usr/include/pthread.h:479:12: note: declared here
479 | extern int __REDIRECT_NTH (pthread_yield, (void), sched_yield)
| ^~~~~~~~~~~~~~
Software used
gcc:
bagrat@laptop:~/proj/games/virus-game$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.2.0-7ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-ZPT0kp/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-ZPT0kp/gcc-11-11.2.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2)
cmake
bagrat@laptop:~/proj/games/virus-game$ cmake --version
cmake version 3.18.4
CMake suite maintained and supported by Kitware (kitware.com/cmake).
make
bagrat@laptop:~/proj/games/virus-game$ make -v
GNU Make 4.3
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
It would be useful to have a week day of Time
structure taken from tm.tm_wday
.
May be it would be better to represent timestamp as signed integer(I mean int64_t
) to allow using dates before the Unix Epoch.
Not sure if it's a common case, but it's definitely might happen. A probably real case - displaying very old monthly chart bars.
1: /CppCommon/tests/test_system_stack_trace.cpp:36: FAILED:
1: REQUIRE( frame.address != nullptr )
1: with expansion:
1: nullptr != nullptr
1: test cases: 173 | 172 passed | 1 failed
1: assertions: 10877 | 10876 passed | 1 failed
Hi @chronoxor ,
I find this divmod is very useful and efficient for fixed division, is there any reference for this algorithm?
Thanks
aligned_storage
is copied, not moved, so the moved Process
closes the original handle in its destructor.
CppCommon isn't compilable with c++14 standard.
I think this would make the UUID class quite a bit more useful.
I think it should not be difficult to create a constexpr constructor for the UUID type, as well as a string literal operator function to convert a well-defined uuid string into a UUID data structure.
CppServer::Asio::Timer::Cancel
method must be called from its io_context
, otherwise there is a data race.
Or mark CppServer::Asio::Timer
as not thread-safe.
P.S. I highly recommend to test all of your libs with thread sanitizer.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.