From this cppreference link, is_integral
has bool
as a member function. How to use it? I could understand other members, and am able to code a simple example as follows. But how to use the bool
member function?
#include <iostream>
#include <type_traits>
using namespace std;
int main(){
cout << boolalpha;
// member constants
cout << is_integral_v<int> << endl; // prints true
// member functions
// operator bool ?
// operator()
cout << is_integral<float>() << endl; // prints false
return 0;
}