|
Boost : |
From: dariomt_at_[hidden]
Date: 2019-06-06 13:53:39
>
> >Are there instructions for developers that I've missed?
>
> There are some instructions here:
>
>
> https://www.boost.org/doc/libs/1_70_0/libs/config/doc/html/boost_config/guidelines_for_boost_authors.html#boost_config.guidelines_for_boost_authors.adding_new_defect_macros
>
> Thanks!
I was expecting developer guidelines in the github readme, not in the
actual library docs! doh!
I have made a PR #285 and after some trial and error (I only have VS2015
and VS2017 available to test locally) I think I have something.
However, in my test I throw and catch exceptions:
int test()
{
std::exception_ptr ep;
try
{
throw 42;
}
catch(...)
{
ep = std::current_exception();
}
try
{
std::rethrow_exception(ep);
}
catch(int i)
{
// return zero on success
return i == 42 ? 0 : 1;
}
return 1;
}
But the CI jobs have gcc and clang configured to compile without exception
support! And I get errors like:
libs/config/test/boost_no_cxx11_hdr_exception.ipp:22:5: error: cannot use
'throw' with exceptions disabled
throw 42;
^
libs/config/test/boost_no_cxx11_hdr_exception.ipp:20:3: error: cannot use
'try' with exceptions disabled
try
^
I have two questions:
1) Where are exceptions disabled in the CI jobs? I can't find it in
the .travis.yml,
but I can see e.g. clang being invoked with -fno-exceptions
2) How can I test proper support for std::current_exception() and
std::rethrow_exception() if exceptions are disabled for the test?
Thanks!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk