vec / vvec
Abstract
Type definitions on SSTD. These definitions are read by #include <sstd/sstd.hpp>
.
SSTD における型の定義.#include <sstd/sstd.hpp>
により定義が読み込まれる.
Header file
namespace sstd{
template <class T> using vec = std::vector<T>;
template <class T> using vvec = std::vector<std::vector<T>>;
}
Usage
- main.cpp
#include <sstd/sstd.hpp> int main(){ sstd::vec<int> v = {1, 2, 3}; // same as a "std::vector<int> v = {1, 2, 3};" sstd::printn(v); sstd::vvec<int> vv = {{1, 2, 3}, {4, 5, 6}}; // same as a "std::vector<vector<int>> vv = {{1, 2, 3}, {4, 5, 6}};" sstd::printn(vv); }
- Execution result
v = [1 2 3] vv = [[1 2 3] [4 5 6]]
Implementation
- Source: header only
- Header: sstd/src/container/vector/typeDef.hpp
- Test: test/src_test/container/vector/typeDef.cpp (Not implemented yet)