Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60159 - trunk/boost/exception/detail
From: emil_at_[hidden]
Date: 2010-03-04 19:05:44


Author: emildotchevski
Date: 2010-03-04 19:05:43 EST (Thu, 04 Mar 2010)
New Revision: 60159
URL: http://svn.boost.org/trac/boost/changeset/60159

Log:
Fixing compile error due to __LINE__ not always being compile-time constant on MSVC
Text files modified:
   trunk/boost/exception/detail/exception_ptr.hpp | 16 ++++++++--------
   1 files changed, 8 insertions(+), 8 deletions(-)

Modified: trunk/boost/exception/detail/exception_ptr.hpp
==============================================================================
--- trunk/boost/exception/detail/exception_ptr.hpp (original)
+++ trunk/boost/exception/detail/exception_ptr.hpp 2010-03-04 19:05:43 EST (Thu, 04 Mar 2010)
@@ -69,7 +69,7 @@
                 {
                 };
 
- template <int Line>
+ template <int Dummy>
         exception_ptr
         get_bad_alloc()
             {
@@ -77,21 +77,21 @@
                 bad_alloc_() <<
                 throw_function("boost::current_exception()") <<
                 throw_file(__FILE__) <<
- throw_line(Line) );
+ throw_line(__LINE__) );
             return e;
             }
 
- template <int Line>
+ template <int Dummy>
         struct
         exception_ptr_bad_alloc
             {
             static exception_ptr const e;
             };
 
- template <int Line>
+ template <int Dummy>
         exception_ptr const
- exception_ptr_bad_alloc<Line>::
- e = get_bad_alloc<Line>();
+ exception_ptr_bad_alloc<Dummy>::
+ e = get_bad_alloc<Dummy>();
         }
 
     class
@@ -354,7 +354,7 @@
         catch(
         std::bad_alloc & )
             {
- ret=exception_detail::exception_ptr_bad_alloc<__LINE__>::e;
+ ret=exception_detail::exception_ptr_bad_alloc<42>::e;
             }
         catch(
         ... )
@@ -366,7 +366,7 @@
             catch(
             std::bad_alloc & )
                 {
- ret=exception_detail::exception_ptr_bad_alloc<__LINE__>::e;
+ ret=exception_detail::exception_ptr_bad_alloc<42>::e;
                 }
             catch(
             ... )


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk