/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
PhysicsTools/Utilities/interface/Numerical.h
25 строк
581 B
Cms Build
Clang-Format
31 май 2019, 17:22
31 май 2019, 17:22
88e58de
Код
Авторство
О чём код?
#ifndef PhysicsTools_Utilities_Numerical_h #define PhysicsTools_Utilities_Numerical_h #include <cassert> namespace funct { template <int n> struct Numerical { Numerical() {} Numerical(int m) { assert(m == n); } static const int value = n; double operator()() const { return n; } operator double() const { return n; } double operator()(double) const { return n; } double operator()(double, double) const { return n; } }; template <int n> const Numerical<n>& num() { static Numerical<n> c; return c; } } // namespace funct #endif