LIBINT 2.9.0
smart_ptr.h
1/*
2 * Copyright (C) 2004-2024 Edward F. Valeev
3 *
4 * This file is part of Libint compiler.
5 *
6 * Libint compiler is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * Libint compiler is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Libint compiler. If not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#ifndef _libint2_src_bin_libint_smartptr_h_
22#define _libint2_src_bin_libint_smartptr_h_
23
24#include <libint2/config.h>
25
26#include <memory>
27#include <type_traits>
28
29namespace libint2 {
30namespace detail {
32template <typename>
33struct IsSharedPtrHelper : std::false_type {};
34template <typename T>
35struct IsSharedPtrHelper<std::shared_ptr<T>> : std::true_type {};
36
37template <typename T>
38struct IsSharedPtr : IsSharedPtrHelper<typename std::remove_const<
39 typename std::remove_reference<T>::type>::type> {};
40} // namespace detail
41} // namespace libint2
42
43#endif
Defaults definitions for various parameters assumed by Libint.
Definition algebra.cc:24
Can be used to determine whether a type is a std::shared_ptr.
Definition smart_ptr.h:33
Definition smart_ptr.h:39