Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/third_party/rust/derive_more/tests/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 611 B image not shown  

Quelle  sum.rs

  Sprache: Rust
 

#![cfg_attr(not(feature = "std"), no_std)]

use derive_more::Sum;

#[derive(Sum)]
struct MyInts(i32, i64);

// Add implementation is needed for Sum
impl ::core::ops::Add for MyInts {
    type Output = MyInts;
    #[inline]
    fn add(self, rhs: MyInts) -> MyInts {
        MyInts(self.0.add(rhs.0), self.1.add(rhs.1))
    }
}

#[derive(Sum)]
struct Point2D {
    x: i32,
    y: i32,
}

impl ::core::ops::Add for Point2D {
    type Output = Point2D;
    #[inline]
    fn add(self, rhs: Point2D) -> Point2D {
        Point2D {
            x: self.x.add(rhs.x),
            y: self.y.add(rhs.y),
        }
    }
}

Messung V0.5 in Prozent
C=86 H=96 G=90

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-19) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.