Download Latest Version cppsp v1.5.2 OOP system --Derive and Extension source code.tar.gz (2.8 MB)
Email in envelope

Get an email when there's a new version of cppsp

Home / v1.5.2
Name Modified Size InfoDownloads / Week
Parent folder
cppsp_compiler.cpp 2026-03-22 87.8 kB
cppsp_compiler.exe 2026-03-22 1.3 MB
cppsp_compiler_mac.delete_mac 2026-03-22 297.7 kB
cppsp_compiler_linux.delete_linux 2026-03-22 2.2 MB
cppsp v1.5.2 OOP system --Derive and Extension source code.tar.gz 2026-03-22 2.8 MB
cppsp v1.5.2 OOP system --Derive and Extension source code.zip 2026-03-22 2.8 MB
README.md 2026-03-22 960 Bytes
Totals: 7 Items   9.4 MB 0

OOP

  • Inheritance : enable single and multi inheritance, use public: a, b,c inheritance in c++

    struct local{ extension_slot("local") } struct der derive(cppsp.test.mytype,local,<{std::vector<int>}>){

    }

  • Extension : used to extend a struct. extension_slot("id") can provide a slot to expand(id is decided by mod writter)

    import cppsp.cpp17.base, test

    struct local{ private: function f1(){} var v int public: function f2(){} var outv int extension_slot("local") } struct extension("local"){ function m1() function m2() } struct extension("cppsp.test.mytype"){ function n1(){ print("test1\n") } } struct extension("local"){ function m3(){ print("test2\n") } } local o o.m3() cppsp.test.mytype oo oo.n1()

Source: README.md, updated 2026-03-22