Code Monkey home page Code Monkey logo

constexpr-contracts's People

Contributors

cjdb avatar rayhamel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

icodein rayhamel

constexpr-contracts's Issues

Tests hang in other projects

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).

Only allow boolean expressions as predicates

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.

Abandon fprintf

Once std::format and constexpr std::string are supported by the implementation, move to those, and possibly even fmt::print.

Enable feature test macros

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.

Use source_location

libc++ doesn't support source_location yet. Once it does, move away from __FILE__ and __LINE__.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.