Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype of removing virtual calls and heap usage for small objects #12

440 changes: 440 additions & 0 deletions include/boost/basic_any.hpp

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions test/Jamfile.v2
Expand Up @@ -17,6 +17,14 @@ test-suite any :
[ compile-fail any_cast_cv_failed.cpp ]
[ compile-fail any_test_temporary_to_ref_failed.cpp ]
[ compile-fail any_test_cv_to_rv_failed.cpp ]
[ run basic_any_test.cpp ]
[ run basic_any_test.cpp : : : <rtti>off <define>BOOST_NO_RTTI <define>BOOST_NO_TYPEID : any_test_no_rtti ]
[ run basic_any_test_rv.cpp ]
[ run basic_any_test_rv.cpp : : : <rtti>off <define>BOOST_NO_RTTI <define>BOOST_NO_TYPEID : any_test_rv_no_rtti ]
[ run basic_any_test_mplif.cpp ]
[ compile-fail basic_any_cast_cv_failed.cpp ]
[ compile-fail basic_any_test_temporary_to_ref_failed.cpp ]
[ compile-fail basic_any_test_cv_to_rv_failed.cpp ]
;


14 changes: 14 additions & 0 deletions test/basic_any_cast_cv_failed.cpp
@@ -0,0 +1,14 @@
// Copyright 2006 Alexander Nasonov.
// Copyright Antony Polukhin, 2013-2019.
rarutyun marked this conversation as resolved.
Show resolved Hide resolved
//
// 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)

#include <boost/basic_any.hpp>

int main() {
boost::basic_any<> const a;
boost::basic_any_cast<int&, 8, 8>(a);
}