Fix tuples comment.

This commit is contained in:
Anthony Calandra
2018-08-23 22:18:32 -04:00
parent 2f7066a939
commit 6bd5496581
2 changed files with 2 additions and 2 deletions

View File

@@ -683,7 +683,7 @@ elapsed_seconds.count(); // t number of seconds, represented as a `double`
### Tuples
Tuples are a fixed-size collection of heterogeneous values. Access the elements of a `std::tuple` by unpacking using [`std::tie`](#stdtie), or using `std::get`.
```c++
// `playerProfile` has type `std::tuple<int, std::string, std::string>`.
// `playerProfile` has type `std::tuple<int, const char*, const char*>`.
auto playerProfile = std::make_tuple(51, "Frans Nielsen", "NYI");
std::get<0>(playerProfile); // 51
std::get<1>(playerProfile); // "Frans Nielsen"

View File

@@ -1250,7 +1250,7 @@ elapsed_seconds.count(); // t number of seconds, represented as a `double`
### Tuples
Tuples are a fixed-size collection of heterogeneous values. Access the elements of a `std::tuple` by unpacking using [`std::tie`](#stdtie), or using `std::get`.
```c++
// `playerProfile` has type `std::tuple<int, std::string, std::string>`.
// `playerProfile` has type `std::tuple<int, const char*, const char*>`.
auto playerProfile = std::make_tuple(51, "Frans Nielsen", "NYI");
std::get<0>(playerProfile); // 51
std::get<1>(playerProfile); // "Frans Nielsen"