aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-05-13 13:50:40 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-05-15 15:58:04 +0300
commited3f024f40771c90e0eb7ef5a51e7e01ab0247d4 (patch)
tree33509032c872aff5beaf8743c2919649230272c0
parentc4a9db2f981a03aecf5e9a60e6d27a6dc6dac159 (diff)
Implement workaround for clang 3.5 bug (#23029)
-rw-r--r--libbutl/sendmail.hxx36
-rw-r--r--libbutl/sendmail.ixx44
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<std::string, 1>;
+ template <typename E>
+ sendmail (E&& err,
+ const std::string& from,
+ const std::string& subject,
+ const recipients_type& to);
+
+ template <typename E>
+ sendmail (E&& err,
+ const std::string& from,
+ const std::string& subject,
+ const recipients_type& to,
+ const recipients_type& cc);
+
template <typename E, typename... O>
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 <typename C, typename E>
+ sendmail (const C&,
+ E&& err,
+ const std::string& from,
+ const std::string& subject,
+ const recipients_type& to);
+
+ template <typename C, typename E>
+ sendmail (const C&,
+ E&& err,
+ const std::string& from,
+ const std::string& subject,
+ const recipients_type& to,
+ const recipients_type& cc);
+
template <typename C, typename E, typename... O>
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 <typename E>
+ 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 <typename E>
+ 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 <typename C, typename E, typename... O>
inline sendmail::
sendmail (const C& cmdc,
@@ -65,4 +86,27 @@ namespace butl
//
headers (from, subj, to, cc, bcc);
}
+
+ template <typename C, typename E>
+ 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 <typename C, typename E>
+ 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 ())
+ {
+ }
}