Git Product home page Git Product logo

cpp2d's People

Contributors

breakin avatar emlai avatar geod24 avatar lhamot 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cpp2d's Issues

Use the 'releases' to emit a binary release?

LLVM is a gigantic dependency, and it would be really nice if I didn't have to build this myself to try it out.
There are plenty of CI services that will automate builds and release.

Create a dproject for the cpp_std lib

The cpp_std.d is to give some features that exist in C++ but are not in D (like red-black-tree associative array), in order to help the convertion of C++ source code.

The cpp_std project will probably grow up, and it will be better to put it in an other standalone project, downloadable with dub.

Build fails on Ubuntu 20.04

Trying to build as

cmake -DCMAKE_PREFIX_PATH=/usr/lib/llvm-10/include .
make

errors as

/home/per/Work/cpp2d/CPP2D/CPP2DPPHandling.h:30:7: error: ‘void CPP2DPPHandling::InclusionDirective(clang::SourceLocation, const clang::Token&, llvm::StringRef, bool, clang::CharSourceRange, const clang::FileEntry*, llvm::StringRef, llvm::StringRef, const clang::Module*)’ marked ‘override’, but does not override
...

on Ubuntu 20.04 with libclang-10-dev installed.

Is this because the Clang API has changed from version 6 to version 10?

Fix missed copy of operand when an operand becom this

Problem

  • When an operator is a free function, it will be moved as member method
  • rhs or lhs will become this
  • If it was passed by copy, it is no more copied

    Solution

  • When an operand is passed by value and become _this_, don't alias it, but copy it.

Add constness porting

I removed const porting because D containers seams to not be const correct.

  • At least add an option to enable/disable it.
  • Convert to immutable when obvious.
  • In case of enable, is there a way to work when using containers (STL => phobos).
    • For example, calling array.length is not possible on a const container.

Make a version of this written in D

Surely, this won't be difficult, if this program actually works well. Just have it convert it's own sources to D, and upload the output on another repository.

[Missing feature] Possible solution for 'const ref' translation

Hi, great project you have here. I'v read that one of your missing features is the const ref problem:
Hard because, unlike in C++, in D we can't pass a rvalue to a const ref parameter
That is sadly true and the current built-in solution (auto ref) only works in combination with templates and leads to template bloat, but there is a cheap-trick to solve this issue, maybe it'll help you out:

struct A
{
    private A* self = null;
    public string name = null;

    this(string name)
    {
        this.name = name;
    }

    @nogc
    ref A asRef()
    {
        this.self = &this;

        return *this.self;
    }
}

void test(ref A a1, ref const A a2)
{
    assert(a1.name == "foo");
    assert(a2.name == "bar");
}

void main()
{
    test(A("foo").asRef, A("bar").asRef);
}

Handle __LINE__ and __FILE__

Handle LINE in and outside of macro and #LINE and ##LINE (and FILE)

  • For the moment, those convertions were disabled because they are not compatible with the # and ## usage in macro.
  • A solution could be to convert theme only outside of macro. But I dont know how to do.
  • FUNCTION is out of scope because it os not a prerocessor define

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.