From cffa8cd68c5acb5ad18bbc96470288dd2d475aa5 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 15 Feb 2022 00:59:05 +0200 Subject: [PATCH] Add a test for throw_with_location with RTTI off --- include/boost/throw_exception.hpp | 1 + test/Jamfile.v2 | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/boost/throw_exception.hpp b/include/boost/throw_exception.hpp index 44b6ad5..f832e16 100644 --- a/include/boost/throw_exception.hpp +++ b/include/boost/throw_exception.hpp @@ -251,6 +251,7 @@ template boost::source_location get_throw_location( E const & e ) { #if defined(BOOST_NO_RTTI) + (void)e; return boost::source_location(); #else diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 3a13aff..ca4ef0a 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -51,3 +51,5 @@ run throw_with_location_test2.cpp ; run throw_with_location_test3.cpp ; run throw_with_location_nx_test.cpp : : : off ; + +run throw_with_location_test3.cpp : : : off : throw_with_location_test3_nr ;