Skip to content

Implicit casting does compile without errors #20

@porky11

Description

@porky11

When assigning a type to another type without explicitely casting, I would expect errors, but there aren't.
For example here:

#include <vsr/vsr.h>
using namespace std;
using namespace vsr;

using ega = vsr::algebra<vsr::metric<3>, int>;

int main() {
    using vector = ega::types::vector;
    auto e1 = ega::types::vector(1,0,0);
    auto e2 = ega::types::vector(0,1,0);
    vector e1e2 = e1*e2;  //this will create a rotor. When assigning to a vector, it will become zero.
    e1e2.print();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions