fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <vector>
  4.  
  5. using namespace std;
  6.  
  7. static_assert(sizeof(char32_t) == sizeof(int), "No valid string exists");
  8. typedef u32string Vector;
  9.  
  10. int main() {
  11. const vector<int> first = {13};
  12. const vector<int> second = {42};
  13. const Vector concatenation = Vector(first.cbegin(), first.cend()) + Vector(second.cbegin(), second.cend());
  14.  
  15. for(auto& i : concatenation) {
  16. cout << i << endl;
  17. }
  18. }
Success #stdin #stdout 0s 3416KB
stdin
Standard input is empty
stdout
13
42