From ed3f024f40771c90e0eb7ef5a51e7e01ab0247d4 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Sat, 13 May 2017 13:50:40 +0300 Subject: Implement workaround for clang 3.5 bug (#23029) --- libbutl/sendmail.hxx | 36 ++++++++++++++++++++++++++++++++---- libbutl/sendmail.ixx | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+), 4 deletions(-) diff --git a/libbutl/sendmail.hxx b/libbutl/sendmail.hxx index 8ff264d..8800aa5 100644 --- a/libbutl/sendmail.hxx +++ b/libbutl/sendmail.hxx @@ -55,25 +55,53 @@ namespace butl // using recipients_type = small_vector; + template + sendmail (E&& err, + const std::string& from, + const std::string& subject, + const recipients_type& to); + + template + sendmail (E&& err, + const std::string& from, + const std::string& subject, + const recipients_type& to, + const recipients_type& cc); + template sendmail (E&& err, const std::string& from, const std::string& subject, const recipients_type& to, - const recipients_type& cc = recipients_type (), - const recipients_type& bcc = recipients_type (), + const recipients_type& cc, + const recipients_type& bcc, O&&... options); // Version with the command line callback (see process_run() for details). // + template + sendmail (const C&, + E&& err, + const std::string& from, + const std::string& subject, + const recipients_type& to); + + template + sendmail (const C&, + E&& err, + const std::string& from, + const std::string& subject, + const recipients_type& to, + const recipients_type& cc); + template sendmail (const C&, E&& err, const std::string& from, const std::string& subject, const recipients_type& to, - const recipients_type& cc = recipients_type (), - const recipients_type& bcc = recipients_type (), + const recipients_type& cc, + const recipients_type& bcc, O&&... options); private: diff --git a/libbutl/sendmail.ixx b/libbutl/sendmail.ixx index 067153c..b88ee20 100644 --- a/libbutl/sendmail.ixx +++ b/libbutl/sendmail.ixx @@ -26,6 +26,27 @@ namespace butl { } + template + inline sendmail:: + sendmail (E&& err, + const std::string& from, + const std::string& subj, + const recipients_type& to, + const recipients_type& cc) + : sendmail (err, from, subj, to, cc, recipients_type ()) + { + } + + template + inline sendmail:: + sendmail (E&& err, + const std::string& from, + const std::string& subj, + const recipients_type& to) + : sendmail (err, from, subj, to, recipients_type ()) + { + } + template inline sendmail:: sendmail (const C& cmdc, @@ -65,4 +86,27 @@ namespace butl // headers (from, subj, to, cc, bcc); } + + template + inline sendmail:: + sendmail (const C& cmdc, + E&& err, + const std::string& from, + const std::string& subj, + const recipients_type& to, + const recipients_type& cc) + : sendmail (cmdc, err, from, subj, to, cc, recipients_type ()) + { + } + + template + inline sendmail:: + sendmail (const C& cmdc, + E&& err, + const std::string& from, + const std::string& subj, + const recipients_type& to) + : sendmail (cmdc, err, from, subj, to, recipients_type ()) + { + } } -- cgit v1.1