Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions SJR.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class SJR
template<class T>
void setValue(T newValue);

template <class ...Args>
void setArray(Args&&... args);

[[nodiscard]]
Type getType() const;
template<class T>
Expand Down Expand Up @@ -131,6 +134,14 @@ bool SJR::save(std::string_view filename)
return true;
}

template <class ...Args>
void SJR::setArray(Args&&... args)
{
type = Type::ARRAY;
vectorJson = std::vector<SJR>{
std::forward<Args>(args)...
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There isn't any constructor, that accepts an argument.

};
}

template<class T>
void SJR::setValue(T newValue)
Expand Down