[Bug c++/94101] New: Variadic template deduction guide issue - error: 'In instantiation of'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94101 Bug ID: 94101 Summary: Variadic template deduction guide issue - error: 'In instantiation of' Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rosemberg at ymail dot com Target Milestone: --- The gcc9.2 (I tested with gcc7) return the follow error due the deduction guide declaration: In instantiation of 'Merged::Merged(T&& ...) (with T = {const main()::&, const main()::&, main()::}; B = {}]': #include template struct Merged : B ... { template Merged(T&& ... t) : B(std::forward(t))... {} using B::operator()...; }; template Merged(T...) -> Merged...>; int main() { const auto l1 = []() { return 4; }; const auto l2 = [](const int i) { return i * 10; }; Merged merged(l1, l2, [](const double d) { return d * 3.2; }); return 0; } Just to clarify, the work around to solve it was to add the follow deduction guide: template Merged (T0, T ...) -> Merged, std::decay_t...>;
[Bug c++/94102] New: Variadic template deduction guide issue - error: 'In instantiation of'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94102 Bug ID: 94102 Summary: Variadic template deduction guide issue - error: 'In instantiation of' Product: gcc Version: 9.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rosemberg at ymail dot com Target Milestone: --- The gcc9.2 (I tested with gcc7) return the follow error due the deduction guide declaration: In instantiation of 'Merged::Merged(T&& ...) (with T = {const main()::&, const main()::&, main()::}; B = {}]': #include template struct Merged : B ... { template Merged(T&& ... t) : B(std::forward(t))... {} using B::operator()...; }; template Merged(T...) -> Merged...>; int main() { const auto l1 = []() { return 4; }; const auto l2 = [](const int i) { return i * 10; }; Merged merged(l1, l2, [](const double d) { return d * 3.2; }); return 0; }
[Bug c++/94102] Variadic template deduction guide issue - error: 'In instantiation of'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94102 --- Comment #1 from rosemberg at ymail dot com --- The work around to solve it was to add the follow deduction guide: template Merged (T0, T ...) -> Merged, std::decay_t...>;
[Bug c++/94102] Variadic template deduction guide issue - error: 'In instantiation of'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94102 --- Comment #2 from rosemberg at ymail dot com --- *** Bug 94101 has been marked as a duplicate of this bug. ***
[Bug c++/94101] Variadic template deduction guide issue - error: 'In instantiation of'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94101 rosemberg at ymail dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #1 from rosemberg at ymail dot com --- . *** This bug has been marked as a duplicate of bug 94102 ***
[Bug c++/78080] New: chown command (sys/stat.h) fail to change the owner directory if the return value is not attributed to a variable.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78080 Bug ID: 78080 Summary: chown command (sys/stat.h) fail to change the owner directory if the return value is not attributed to a variable. Product: gcc Version: 5.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rosemberg at ymail dot com Target Milestone: --- Hi, chown command (sys/stat.h) fail to change the owner directory if the return value is not attributed to a variable. Supposed the directory /home/user/tochange exists and the program is running with administrator rights and tochange owner and group is not the same like its parent directory . example of success code: #include #include #include int main() { string sPath("/home/user/tochange"); struct stat info; stat("/home/user",&info); int iA = chown(sPath.c_str(), info.st_uid, info.st_gid); cout << iA << endl; return 0; } The result to iA will be 0 (success) If I change the last 2 lines (before return 0;) to the follow code, the chown command failed and cout will return -1 (nothing was changed): cout << chown(sPath.c_str(), info.st_uid, info.st_gid) << endl; it also happened with if statement. Best regards, M.Rosemberg