• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //////////////////////////////////////////////////////////////////////////////
2 //
3 // (C) Copyright Ion Gaztanaga 2014-2015. Distributed under the Boost
4 // Software License, Version 1.0. (See accompanying file
5 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://www.boost.org/libs/interprocess for documentation.
8 //
9 //////////////////////////////////////////////////////////////////////////////
10 #ifndef BOOST_INTERPROCESS_DETAIL_NOTHROW_HPP
11 #define BOOST_INTERPROCESS_DETAIL_NOTHROW_HPP
12 
13 #ifndef BOOST_CONFIG_HPP
14 #  include <boost/config.hpp>
15 #endif
16 #
17 #if defined(BOOST_HAS_PRAGMA_ONCE)
18 #  pragma once
19 #endif
20 
21 namespace std {   //no namespace versioning in clang+libc++
22 
23 struct nothrow_t;
24 
25 }  //namespace std {
26 
27 namespace boost{ namespace interprocess {
28 
29 template <int Dummy = 0>
30 struct nothrow
31 {
getboost::interprocess::nothrow32    static const std::nothrow_t &get()   {  return *pnothrow;  }
33    static std::nothrow_t *pnothrow;
34 };
35 
36 template <int Dummy>
37 std::nothrow_t *nothrow<Dummy>::pnothrow =
38    reinterpret_cast<std::nothrow_t *>(0x1234);  //Avoid sanitizer warnings on references to null
39 
40 }}  //namespace boost{ namespace interprocess {
41 
42 #endif //#ifndef BOOST_INTERPROCESS_DETAIL_NOTHROW_HPP
43