bug fixes, tests passed, result modifier (!) added to function arguments and to types

This commit is contained in:
ProgramSnail 2023-07-24 13:01:34 +03:00
parent 4470454838
commit 3914ff7d8b
16 changed files with 418 additions and 62 deletions

View file

@ -15,10 +15,18 @@ public:
SymbolDocs(const std::string &description) : description_(description) {}
template <typename T>
bool add_annotation_info(const std::string &annotation, T &&info) {
bool add_annotation_info(const std::string &annotation, std::string &&info) {
if (annotations_info_.count(annotation) == 0) {
annotations_info_[annotation] = std::forward<T>(info);
annotations_info_[annotation] = std::move(info);
return true;
}
return false;
}
bool add_annotation_info(const std::string &annotation,
const std::string &info) {
if (annotations_info_.count(annotation) == 0) {
annotations_info_[annotation] = info;
return true;
}
return false;