1#ifndef BASE_UTILS_ARRAY_REF_H_
2#define BASE_UTILS_ARRAY_REF_H_
29 !std::is_same<T, bool>::value,
30 "array_ref<bool> cannot be constructed from a std::vector<bool> bitfield.");
48 constexpr const T*
data()
const {
52 constexpr size_t size()
const {
60 constexpr const T&
back()
const {
73 typename std::enable_if<std::is_same<U, T>::value,
array_ref<T>>::type&
77 typename std::enable_if<std::is_same<U, T>::value,
array_ref<T>>::type&
80 std::vector<T>
vec()
const {
89 for (
const auto& item : arr) {
Definition array_ref.h:12
constexpr const T & back() const
Definition array_ref.h:60
constexpr array_ref(T *data, size_t length)
Definition array_ref.h:20
constexpr const T & operator[](size_t index) const
Definition array_ref.h:68
constexpr const T * data() const
Definition array_ref.h:48
constexpr const T & front() const
Definition array_ref.h:56
constexpr bool empty() const
Definition array_ref.h:44
std::enable_if< std::is_same< U, T >::value, array_ref< T > >::type & operator=(std::initializer_list< U >)=delete
std::vector< T > vec() const
Definition array_ref.h:80
size_t length_
Definition array_ref.h:16
constexpr array_ref(const T &item)
Definition array_ref.h:22
constexpr size_t size() const
Definition array_ref.h:52
constexpr array_ref()
Definition array_ref.h:19
array_ref(const std::vector< T, A > &vec)
Definition array_ref.h:26
constexpr const T * end() const
Definition array_ref.h:42
constexpr array_ref(T *begin, T *end)
Definition array_ref.h:21
constexpr array_ref(const std::array< T, N > &arr)
Definition array_ref.h:35
T * data_
Definition array_ref.h:15
constexpr array_ref(const std::initializer_list< T > &list)
Definition array_ref.h:38
constexpr bool equals(const array_ref< T > &rhs) const
Definition array_ref.h:64
std::enable_if< std::is_same< U, T >::value, array_ref< T > >::type & operator=(U &&Temporary)=delete
constexpr const T * begin() const
Definition array_ref.h:41
#define N
Definition exp.cpp:24
#define T
Definition exp.cpp:237
std::ostream & operator<<(std::ostream &out, array_ref< T > arr)
Definition array_ref.h:86
bool operator==(array_ref< T > a1, array_ref< T > a2)
Definition array_ref.h:99
bool operator!=(array_ref< T > a1, array_ref< T > a2)
Definition array_ref.h:104
list(APPEND objects esolver.cpp esolver_ks.cpp esolver_fp.cpp esolver_ks_pw.cpp esolver_ks_lcaopw.cpp esolver_sdft_pw.cpp esolver_lj.cpp esolver_dp.cpp esolver_of.cpp esolver_of_interface.cpp esolver_of_tool.cpp pw_others.cpp pw_setup.cpp) if(ENABLE_LCAO) list(APPEND objects esolver_ks_lcao.cpp esolver_ks_lcao_tddft.cpp lcao_before_scf.cpp lcao_after_scf.cpp esolver_gets.cpp lcao_others.cpp esolver_dm2rho.cpp) endif() add_library(esolver OBJECT $
Definition CMakeLists.txt:1