libcppa
Version 0.1
|
Functions | |
template<typename... Types> | |
tuple< Types...> | make_tuple (const Types &...args) |
The message passing of libcppa
prohibits pointers in messages because it enforces network transparent messaging. Unfortunately, string literals in C++
have the type const char*
, resp. const char[]
. Since libcppa
is a user-friendly library, it silently converts string literals and C-strings to std::string
objects. It also converts unicode literals to the corresponding STL container.
A few examples:
// sends an std::string containing "hello actor!" to itself send(self(), "hello actor!"); const char* cstring = "cstring"; // sends an std::string containing "cstring" to itself send(self(), cstring); // sends an std::u16string containing the UTF16 string "hello unicode world!" send(self(), u"hello unicode world!"); // x has the type cppa::tuple<std::string, std::string> auto x = make_tuple("hello", "tuple"); receive ( // equal to: on(std::string("hello actor!")) on("hello actor!") >> []() { } );
tuple< Types...> make_tuple | ( | const Types &... | args | ) | [related] |
Creates a new tuple from args
.
args | Values for the tuple elements. |
args
.