summaryrefslogtreecommitdiff
path: root/boost/asio/detail/call_stack.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/detail/call_stack.hpp')
-rw-r--r--boost/asio/detail/call_stack.hpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/boost/asio/detail/call_stack.hpp b/boost/asio/detail/call_stack.hpp
index db4cd1ed66..62aeb40a6a 100644
--- a/boost/asio/detail/call_stack.hpp
+++ b/boost/asio/detail/call_stack.hpp
@@ -2,7 +2,7 @@
// detail/call_stack.hpp
// ~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -102,6 +102,13 @@ public:
return 0;
}
+ // Obtain the value at the top of the stack.
+ static Value* top()
+ {
+ context* elem = top_;
+ return elem ? elem->value_ : 0;
+ }
+
private:
// The top of the stack of calls for the current thread.
static tss_ptr<context> top_;