Skip to content
brett hartshorn edited this page Apr 8, 2015 · 1 revision

Rusthon supports normal C++ syntax for namespaces ::, this allows you to easily integrate with external c++ libraries. note that below [...] is used to dereference the pointer (default vectors are wrapped by std::shared_ptr).

v = []int(1,2,3)
std::max_element( std::begin(v[...]), std::end(v[...]) )

example

namespace("")

the builtin namespace(...) is translated to using namespace ... in c++.

namespace("foo::bar")

Sidebar

Clone this wiki locally