• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2 Copyright 2017 Glen Joseph Fernandes
3 (glenjofe@gmail.com)
4 
5 Distributed under the Boost Software License, Version 1.0.
6 (http://www.boost.org/LICENSE_1_0.txt)
7 */
8 
9 #include <boost/core/addressof.hpp>
10 
11 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
12     !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
13 struct type { };
14 
function()15 inline const type function()
16 {
17     return type();
18 }
19 
main()20 int main()
21 {
22     (void)boost::addressof(function());
23 }
24 #else
25 #error Requires rvalue references and deleted functions
26 #endif
27