• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Created by Josh on 1/2/2018.
3  *  Copyright 2018 Two Blue Cubes Ltd. All rights reserved.
4  *
5  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
6  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7  */
8 
9 #include "catch_compiler_capabilities.h"
10 #include "catch_uncaught_exceptions.h"
11 #include <exception>
12 
13 namespace Catch {
uncaught_exceptions()14     bool uncaught_exceptions() {
15 #if defined(CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTIONS)
16         return std::uncaught_exceptions() > 0;
17 #else
18         return std::uncaught_exception();
19 #endif
20   }
21 } // end namespace Catch
22