Skip to content

asqqwwd/VectorAndMatrix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tensor Library: generalized implementation of vector and matrix with SFINAE

SFINAE

// A
template<typename T, typename = std::enable_if_t<T>>
void func()
{
}

// B
template<typename T>
void func(typename std::enable_if_t<std::is_integral_v<T>>* = nullptr)
{
}

Concept (C++ 20)

tempalte <typename T>
concept IsIntegral = std::is_integral_v<T>;

// A
IsIntegral auto (IsIntegral auto a, IsIntegral auto b)
{
}

// B
template<typename T> 
requires IsIntegral<T>
void func(T a)
{
}

// C
template<typename T>
void func(T a) requires IsIntegral<T>
{
}

// D
template<IsIntegral T>
void func(T a)
{
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published