From d3c27315d146c569994f2fc1d99d919c812496a1 Mon Sep 17 00:00:00 2001 From: Emil Dotchevski Date: Fri, 5 Mar 2010 00:05:43 +0000 Subject: [PATCH] Fixing compile error due to __LINE__ not always being compile-time constant on MSVC [SVN r60159] --- include/boost/exception/detail/exception_ptr.hpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/boost/exception/detail/exception_ptr.hpp b/include/boost/exception/detail/exception_ptr.hpp index f0b2491..59686e9 100644 --- a/include/boost/exception/detail/exception_ptr.hpp +++ b/include/boost/exception/detail/exception_ptr.hpp @@ -69,7 +69,7 @@ boost { }; - template + template exception_ptr get_bad_alloc() { @@ -77,21 +77,21 @@ boost bad_alloc_() << throw_function("boost::current_exception()") << throw_file(__FILE__) << - throw_line(Line) ); + throw_line(__LINE__) ); return e; } - template + template struct exception_ptr_bad_alloc { static exception_ptr const e; }; - template + template exception_ptr const - exception_ptr_bad_alloc:: - e = get_bad_alloc(); + exception_ptr_bad_alloc:: + e = get_bad_alloc(); } class @@ -354,7 +354,7 @@ boost 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 @@ boost catch( std::bad_alloc & ) { - ret=exception_detail::exception_ptr_bad_alloc<__LINE__>::e; + ret=exception_detail::exception_ptr_bad_alloc<42>::e; } catch( ... )