Skip to content

Commit 1c1e144

Browse files
committed
modernise as()
1 parent 69ef8e8 commit 1c1e144

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

DataFormats/Headers/include/Headers/DataHeader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ struct Descriptor {
295295

296296
/// get the descriptor as std::string
297297
template <typename T>
298-
std::enable_if_t<std::is_same<T, std::string>::value == true, T> as() const
298+
requires(std::same_as<T, std::string>)
299+
T as() const
299300
{
300301
// backward search to find first non-zero char
301302
// FIXME: can optimize this by using the int value to start at e.g. size/2

0 commit comments

Comments
 (0)