epoc32/include/stdapis/boost/detail/bad_weak_ptr.hpp
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
#ifndef BOOST_BAD_WEAK_PTR_HPP_INCLUDED
williamr@2
     2
#define BOOST_BAD_WEAK_PTR_HPP_INCLUDED
williamr@2
     3
williamr@2
     4
// MS compatible compilers support #pragma once
williamr@2
     5
williamr@2
     6
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
williamr@2
     7
# pragma once
williamr@2
     8
#endif
williamr@2
     9
williamr@2
    10
//
williamr@2
    11
//  detail/bad_weak_ptr.hpp
williamr@2
    12
//
williamr@2
    13
//  Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
williamr@2
    14
//
williamr@2
    15
// Distributed under the Boost Software License, Version 1.0. (See
williamr@2
    16
// accompanying file LICENSE_1_0.txt or copy at
williamr@2
    17
// http://www.boost.org/LICENSE_1_0.txt)
williamr@2
    18
//
williamr@2
    19
williamr@2
    20
#include <exception>
williamr@2
    21
williamr@2
    22
#ifdef __BORLANDC__
williamr@2
    23
# pragma warn -8026     // Functions with excep. spec. are not expanded inline
williamr@2
    24
#endif
williamr@2
    25
williamr@2
    26
namespace boost
williamr@2
    27
{
williamr@2
    28
williamr@2
    29
// The standard library that comes with Borland C++ 5.5.1, 5.6.4
williamr@2
    30
// defines std::exception and its members as having C calling
williamr@2
    31
// convention (-pc). When the definition of bad_weak_ptr
williamr@2
    32
// is compiled with -ps, the compiler issues an error.
williamr@2
    33
// Hence, the temporary #pragma option -pc below.
williamr@2
    34
williamr@2
    35
#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
williamr@2
    36
# pragma option push -pc
williamr@2
    37
#endif
williamr@2
    38
williamr@2
    39
class bad_weak_ptr: public std::exception
williamr@2
    40
{
williamr@2
    41
public:
williamr@2
    42
williamr@2
    43
    virtual char const * what() const throw()
williamr@2
    44
    {
williamr@2
    45
        return "tr1::bad_weak_ptr";
williamr@2
    46
    }
williamr@2
    47
};
williamr@2
    48
williamr@2
    49
#if defined(__BORLANDC__) && __BORLANDC__ <= 0x564
williamr@2
    50
# pragma option pop
williamr@2
    51
#endif
williamr@2
    52
williamr@2
    53
} // namespace boost
williamr@2
    54
williamr@2
    55
#ifdef __BORLANDC__
williamr@2
    56
# pragma warn .8026     // Functions with excep. spec. are not expanded inline
williamr@2
    57
#endif
williamr@2
    58
williamr@2
    59
#endif  // #ifndef BOOST_BAD_WEAK_PTR_HPP_INCLUDED