1 #ifndef fhiclcpp_types_TupleAs_h 2 #define fhiclcpp_types_TupleAs_h 22 template <
typename T,
typename... ARGS>
25 template <
typename T,
typename... ARGS>
51 return tupleObj_(via) ? std::make_from_tuple<T>(via) :
52 tupleObj_.has_default() ?
79 template <
typename T,
typename... ARGS>
84 template <
typename T,
typename... ARGS>
91 template <
typename T,
typename... ARGS>
103 template <
typename T,
typename... ARGS>
108 template <
typename T,
typename... ARGS>
111 , t_{std::make_shared<T>(
t)}
116 template <
typename T,
typename... ARGS>
124 , t_{std::make_shared<T>(
t)}
129 template <
typename T,
typename... ARGS>
134 "N.B. The following sequence is converted to type:";
136 " '" + cet::demangle_symbol(
typeid(T).
name()) +
"'";
140 std::ostringstream oss;
141 oss << preface <<
'\n' << name << user_comment;
142 return Comment{oss.str().c_str()};
149 namespace has_insertion_operator_impl {
154 template <
typename T>
158 no
operator<<(std::ostream
const&, any_t
const&);
160 yes&
test(std::ostream&);
163 template <
typename T>
165 static std::ostream&
s;
167 static bool const value =
sizeof(
test(s << t)) ==
sizeof(yes);
171 template <
typename T>
176 template <
typename T>
180 return " A default value is present, but it cannot be\n" 181 " printed out since no 'operator<<' overload has\n" 182 " been provided for the above type.";
187 template <
typename T>
191 std::ostringstream os;
192 os <<
" with a default value of:\n" 200 template <
typename T,
typename... ARGS>
205 "N.B. The following sequence is converted to type:"};
207 cet::demangle_symbol(
typeid(T).
name()) +
"'"};
215 std::ostringstream oss;
216 oss << preface <<
'\n' 218 << stringified_default(t) << user_comment;
219 return Comment{oss.str().c_str()};
typename OptionalTuple< ARGS... >::ftype ftype
std::string operator()(T const &)
typename OptionalTuple< ARGS... >::value_type via_type
yes & test(std::ostream &)
std::string operator()(T const &t)
std::ostream & operator<<(std::ostream &, ParameterSetID const &)
void function(int client, int *resource, int parblock, int *test, int p)
OptionalTuple< ARGS... > tupleObj_
cet::coded_exception< error, detail::translate > exception