C++ concepts: NumericType - cppreference.com

##### cppreference.com

##### Search

Create account

##### Namespaces

- Page
- Discussion

##### Variants

##### Views

- View
- Edit
- History

##### Actions

# C++ concepts: NumericType

From cppreference.com
< cpp‎ | concept

Specifies that the type can be used as the template argument of std::valarray

### [edit] Requirements

for a type `T` to be an `NumericType`:

- `T` cannot be a reference
- `T` cannot be cv-qualified
- If `T` is a class, it

  - does not overload operator&
  - has no pure virtual member functions (is not abstract)
  - has a public default constructor
  - has a public copy constructor T::T(const T&)
  - has a public destructor
  - has a public assignment operator T& T::operator=(const T&) or T& T::operator=(T)
  - default constructor followed by assignment has the same effect as copy constructor
  - destructor followed by copy constructor has the same effect as assignment

- No operation on `T` may throw exceptions

Retrieved from "http://en.cppreference.com/mwiki/index.php?title=cpp/concept/NumericType&oldid=72364"