cjdb / constexpr-contracts Goto Github PK
View Code? Open in Web Editor NEWPre-conditions, post-conditions, and assertions, all available at compile-time
License: Apache License 2.0
Pre-conditions, post-conditions, and assertions, all available at compile-time
License: Apache License 2.0
clang-tidy doesn't seem to respect feature-test macros, but part of the design is done so that clang-tidy doesn't see through attempts to force a compile-time error (e.g. not using static_assert
in the consteval
function). This means that __cpp_lib_is_constant_evaluated
can't be enabled till clang-tidy acknowledges that.
consteval
doesn't have a feature-test macro at present.
Once std::format
and constexpr std::string
are supported by the implementation, move to those, and possibly even fmt::print
.
It's possible to have CJDB_ASSERTS(f)
, where f
is a function pointer or lambda. I've treated CJDB_ASSERT
like an algorithm or std::invoke
too many times to count, so it's probably best to force f
to be of type bool
to catch such issues.
libc++ doesn't support source_location
yet. Once it does, move away from __FILE__
and __LINE__
.
When pulling the project from conan as a dependency, running the test cases hangs. This is likely due to the fact that no code is emitted when a contract's predicate is false (and this means main
doesn't even return).
Prefer standard attributes over non-standard attributes.
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.