Thyra::DetachedVectorView warnings in gcc 6.2
Created by: rppawlo
@trilinos/thyra
The Thyra::DetachedVectorView is generating warnings with gcc 6.2 compiler due to exceptions being called in the destructor:
[ 98%] Building CXX object tempus/test/TestModels/CMakeFiles/tempus_test_models.dir/CDR_Model.cpp.o
In file included from /Users/rppawlo/Trilinos/packages/teuchos/core/src/Teuchos_Assert.hpp:46:0,
from /Users/rppawlo/Trilinos/packages/teuchos/core/src/Teuchos_Array.hpp:50,
from /Users/rppawlo/Trilinos/packages/rtop/src/interfaces/RTOpPack_Types.hpp:49,
from /Users/rppawlo/Trilinos/packages/thyra/core/src/interfaces/operator_vector/fundamental/Thyra_OperatorVectorTypes.hpp:46,
from /Users/rppawlo/Trilinos/packages/thyra/core/src/interfaces/operator_vector/fundamental/Thyra_VectorBase.hpp:46,
from /Users/rppawlo/Trilinos/packages/thyra/core/src/support/nonlinear/model_evaluator/client_support/Thyra_ModelEvaluatorDefaultBase.hpp:45,
from /Users/rppawlo/Trilinos/packages/thyra/core/src/support/nonlinear/model_evaluator/client_support/Thyra_StateFuncModelEvaluatorBase.hpp:45,
from /Users/rppawlo/Trilinos/tempus/test/TestModels/CDR_Model_decl.hpp:4,
from /Users/rppawlo/BUILD/tempus/test/TestModels/CDR_Model.hpp:1,
from /Users/rppawlo/Trilinos/tempus/test/TestModels/CDR_Model.cpp:4:
/Users/rppawlo/Trilinos/packages/thyra/core/src/support/operator_vector/client_support/Thyra_DetachedVectorView.hpp: In instantiation of 'Thyra::DetachedVectorView::~DetachedVectorView() [with Scalar = double]':
/Users/rppawlo/Trilinos/tempus/test/TestModels/CDR_Model_impl.hpp:184:43: required from 'void Tempus_Test::CDR_Model::set_x0(const Teuchos::ArrayView&) [with Scalar = double]'
/Users/rppawlo/Trilinos/tempus/test/TestModels/CDR_Model.cpp:8:3: required from here
/Users/rppawlo/Trilinos/packages/teuchos/core/src/Teuchos_TestForException.hpp:183:28: warning: throw will always call terminate() [-Wterminate]
throw Exception(omsgstr);
^
/Users/rppawlo/Trilinos/packages/teuchos/core/src/Teuchos_TestForException.hpp:325:3: note: in expansion of macro TEUCHOS_TEST_FOR_EXCEPTION'
TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, std::logic_error, msg)
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rppawlo/Trilinos/packages/thyra/core/src/support/operator_vector/client_support/Thyra_DetachedVectorView.hpp:345:9: note: in expansion of macro 'TEUCHOS_TEST_FOR_EXCEPT_MSG'
TEUCHOS_TEST_FOR_EXCEPT_MSG(true, "I don't think non-unit stride has ever been tested!");
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rppawlo/Trilinos/packages/teuchos/core/src/Teuchos_TestForException.hpp:183:28: note: in C++11 destructors default to noexcept
throw Exception(omsgstr);
^
/Users/rppawlo/Trilinos/packages/teuchos/core/src/Teuchos_TestForException.hpp:325:3: note: in expansion of macro TEUCHOS_TEST_FOR_EXCEPTION'
TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, std::logic_error, msg)
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/rppawlo/Trilinos/packages/thyra/core/src/support/operator_vector/client_support/Thyra_DetachedVectorView.hpp:345:9: note: in expansion of macro 'TEUCHOS_TEST_FOR_EXCEPT_MSG'
TEUCHOS_TEST_FOR_EXCEPT_MSG(true, "I don't think non-unit stride has ever been tested!");
^~~~~~~~~~~~~~~~~~~~~~~~~~~