mirror of
https://github.com/Light-City/CPlusPlusThings.git
synced 2026-02-04 02:54:42 +08:00
support bazel complie this project and format code.
This commit is contained in:
32
learn_class/modern_cpp_30/constexpr/container.cpp
Normal file
32
learn_class/modern_cpp_30/constexpr/container.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// Created by light on 19-12-16.
|
||||
//
|
||||
|
||||
#include "../container1/output_container.h"
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
map<int, int> mp{{1, 1}, {2, 4}, {3, 9}};
|
||||
cout << mp << endl;
|
||||
vector<vector<int>> vv{{1, 1}, {2, 4}, {3, 9}};
|
||||
cout << vv << endl;
|
||||
|
||||
pair<int, int> p{1, 2};
|
||||
cout << p << endl;
|
||||
|
||||
set<int> s{1, 2, 3};
|
||||
cout << s << endl;
|
||||
|
||||
vector<char> v{'a', 'b'};
|
||||
cout << v << endl;
|
||||
set<char *> vs{"a", "b"};
|
||||
cout << vs << endl;
|
||||
|
||||
map<int, char *> mm{{1, "23"}, {2, "234hi"}};
|
||||
cout << mm << endl;
|
||||
}
|
||||
Reference in New Issue
Block a user