PrevUpHomeNext

cpp integral type


cpp: c++ integral type - Posted on Jan 31, 2024 - See https://en.cppreference.com/w/cpp/concepts/integral - Logs Home - d0006

cpp integral type: std::integral

c++ integral type:

bool, char, char8_t, char16_t, char32_t, wchar_t, short, int, long, long long

signed

unsigned

std::integral:

template< class T >
concept integral = std::is_integral_v<T>; // (since C++20)

The concept integral<T> is satisfied if and only if T is an integral type.

c++ example

#include <concepts>	// std::integral
#include <iostream>

int main()
{
	std::integral auto x = 9;
	std::cout << x << std::endl;
}

cpp/c++

c++ std::exception:

std::cout.write(err.data(), err.size());

std::cout << std::endl;

caught:

  ===================================
  #  The c++ programming language.  #
  #                                 #
  #  Join c++ Discord: yZcauUAUyC   #
  #  Deck                           #
  ===================================

Home: cppfx.xyz

K


PrevUpHomeNext