It contains the information about tuple size.
DeclarationFollowing is the declaration for std::tuple_size.
C++98template <class T> class tuple_size;C++11
template <class T> class tuple_size;Parameters
t − It contains type for which the tuple size is obtained.
Return Valuenone
ExceptionsNo-throw guarantee − this member function never throws exceptions.
Data racesThe members of both tuple objects are modified.
ExampleIn below example for std::tuple_size.
#include <iostream> #include <tuple> int main () { std::tuple<int,int,char,double> mytuple (100,900,'a',3.14); std::cout << "tuple has "; std::cout << std::tuple_size<decltype(mytuple)>::value; std::cout << " elements." << '\n'; return 0; }
The output should be like this −
tuple has 4 elements.
tuple.htm
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4