Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
blob
main
examples
external_packages
clvisc_wrapper
googletest
gtl
include
src
tests
bellman_ford_test.cpp
graph_test.cpp
helper.h
my_test.cc
my_test2.cc
my_test3.cc
my_test4.cc
hydro_from_external_file
trento
cornelius.cpp
cornelius.h
fjcore.cc
fjcore.hh
gzstream.cc
gzstream.h
sigslot.h
tinyxml2.cc
tinyxml2.h
jail
src
KFParticle
macros
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
helper.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file helper.h
1
#include <cstddef>
2
#include <memory>
3
#include <type_traits>
4
#include <utility>
5
6
namespace
std {
7
template
<
class
T>
struct
_Unique_if
{
8
typedef
unique_ptr<T>
_Single_object
;
9
};
10
11
template
<
class
T>
struct
_Unique_if
<
T
[]> {
12
typedef
unique_ptr<T[]>
_Unknown_bound
;
13
};
14
15
template
<
class
T,
size_t
N>
struct
_Unique_if
<
T
[
N
]> {
16
typedef
void
_Known_bound
;
17
};
18
19
template
<
class
T
,
class
...
Args
>
20
typename
_Unique_if<T>::_Single_object
21
make_unique(
Args
&&...
args
) {
22
return
unique_ptr<T>(
new
T
(std::forward<Args>(
args
)...));
23
}
24
25
template
<
class
T>
26
typename
_Unique_if<T>::_Unknown_bound
27
make_unique(
size_t
n
) {
28
typedef
typename
remove_extent<T>::type
U;
29
return
unique_ptr<T>(
new
U[
n
]());
30
}
31
32
template
<
class
T
,
class
...
Args
>
33
typename
_Unique_if<T>::_Known_bound
34
make_unique(
Args
&&...) =
delete
;
35
}
JETSCAPE
blob
main
external_packages
gtl
tests
helper.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:23
using
1.8.2 with
sPHENIX GitHub integration