Commit Graph
249 Commits
Author SHA1 Message Date
Antony Polukhin baa5019c90 Merge pull request #16 from bebuch/develop
fix ctti_type_index for GCC 7
boost-1.65.1 boost-1.65.0
2017-07-29 20:13:04 +03:00
Benjamin Buch 4585bab3c3 __PRETTY_FUNCTION__ is slightly different in GCC 7
The output of an unsigned int literal dosn't contain the u anymore.

	#include <iostream>

	template < typename T >
	struct ctti{
		template < unsigned int D = 1 >
		static constexpr auto name()noexcept{
			return __PRETTY_FUNCTION__;
		}
	};

	int main(){
		using ctti = ctti< int >;
		std::cout << ctti::name() << '\n';
	}
2017-07-28 15:07:19 +02:00
Antony Polukhin 93e7b2458b Fixed some warnings 2017-06-25 14:05:08 +03:00
Antony Polukhin b0737f4169 Fix formatting in README 2017-05-18 22:51:47 +03:00
Antony Polukhin be74716251 Use native hash_code() when possible on GCC-like compilers 2017-05-18 22:50:25 +03:00
Antony Polukhin f82eab8882 Merge pull request #15 from ecatmur/ecatmur-stl-hash
Include <boost/functional/hash.hpp> if required
2017-05-06 10:26:30 +03:00
Antony Polukhin af61d6b8ed Merge pull request #13 from cdglove/split_register_and_implement
Add support for using runtime_cast without requiring type_id_runtime.
boost-1.64.0-beta2 boost-1.64.0-beta1 boost-1.64.0
2017-02-28 05:33:07 +04:00
Chris Glover d3d4e8d18a Change runtime cast test to use the separated macro (BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST) and add a new test that ensures BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS does indeed supply both functions. 2017-02-25 15:35:34 -05:00
Chris Glover 7f8af2a6e9 Merge branch 'develop' into split_register_and_implement 2017-02-25 13:19:16 -05:00
Antony Polukhin 342d835289 Run MinGW tests too (thanks to Pavel Filinov for showing that appveyor apability) 2017-02-23 21:35:40 +03:00
Edward Catmur 5cacb67510 Make it derived class responsibility to include <boost/functional/hash.hpp> 2017-02-16 21:55:12 +00:00
Ed Catmur f2616bcd17 Correct preprocessor condition to match below 2017-02-16 16:30:52 +00:00
Ed Catmur 8c582362d0 Include <boost/functional/hash.hpp> if required 2017-02-16 16:18:48 +00:00
Antony Polukhin f71d9eb3f2 Fix undefined macro warning (trac 12739) 2017-01-18 22:33:13 +03:00
Antony Polukhin cfcdcd647d Update CI script version 2016-12-04 02:39:22 +03:00
Antony Polukhin 8bee2f6939 Fix coverage info gathering in travisCI script for GCC-6 2016-12-04 02:29:02 +03:00
Antony Polukhin 40985de221 Update CI scripts and tests 2016-11-18 22:31:01 +03:00
Chris Glover d8bdbad2ec Add BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST, which implementes the functionality for runtime_cast to function, but does not include the BOOST_TYPE_INDEX_REGISTER_CLASS macro.
Reimplement BOOST_TYPE_INDEX_REGISTER_RUNTIME_CLASS to simply call BOOST_TYPE_INDEX_IMPLEMENT_RUNTIME_CAST and BOOST_TYPE_INDEX_REGISTER_CLASS.

This allows users to opt-in to one or the other, instead of forcing them to generate both virtual functions.
2016-11-05 16:04:13 -04:00
Rene Rivera c52fdfe30c Add, and update, documentation build targets. boost-1.63.0 2016-10-07 23:07:37 -05:00
Antony Polukhin 7f840c882e Fix build in C++98 mode 2016-10-02 10:39:54 +03:00
Antony Polukhin b669f0244e Changed std::size_t to unsigned int in compile_time_type_infohelpers. Now the code is more platform independant. 2016-10-02 10:32:50 +03:00
Antony Polukhin d656e1879a Merge pull request #12 from cdglove/runtime_cast_test_fixes
Cleanup of shared_ptr ifdef.
2016-10-02 10:58:49 +04:00
Chris Glover b1ed011b6e Cleaner removal of std::shared_ptr tests on compilers without C++11 shared_ptr 2016-10-01 14:49:28 -04:00
Antony Polukhin 4d1cf425e0 Merge pull request #11 from cdglove/runtime_cast_test_fixes
Runtime cast test fixes
2016-09-30 21:34:10 +04:00
Chris Glover d6ca24ff3c Merge branch 'runtime_cast' into runtime_cast_test_fixes 2016-09-29 22:31:07 -04:00
Chris Glover 4459af9532 FIx a unit test so that the NULL check happens before the dereference. 2016-09-29 22:29:35 -04:00
Chris Glover b61a7423b7 Update unit test to remove shared_ptr on compilers less than C++11. 2016-09-29 22:29:10 -04:00
Chris Glover 1a918009fd Fix comment. 2016-09-29 22:27:10 -04:00
Antony Polukhin 045ab1d779 Merge pull request #8 from cdglove/runtime_cast
Add the concept of runtime_cast to type index as an emulation of dynamic_cast..
2016-09-29 00:45:39 +04:00
Antony Polukhin 6cf5288a8c Merge pull request #9 from efcs/clang-4-fix
Support Clang version 4.0.
boost-1.62.0
2016-08-30 22:43:14 +04:00
Eric Fiselier 4453acf867 Support Clang 4.0 and newer 2016-08-29 22:10:34 -06:00
Chris Glover b6b23bad3a Cleanup line endings, file endings, some spacing etc. 2016-08-21 12:47:44 -04:00
Chris Glover 3bb646d19b - Use boost::addressof instead of &
- Remove nullptr from test
- add boost::typeindex::bad_runtime_cast, remove std::bad_cast
2016-08-21 11:01:26 -04:00
Chris Glover 9cd218bbc4 Add missing include to example. 2016-08-19 18:42:22 -04:00
Chris Glover ad26256d09 Initial documentation. 2016-08-11 10:31:16 -04:00
Chris Glover 5af925602e Invoke smart_ptr tests. 2016-08-10 10:06:41 -04:00
Chris Glover 2fb667a6a0 Experiment with a version of runtime_cast that has only a single registration macro. 2016-08-09 23:13:54 -04:00
Chris Glover 12751e0f83 Split runtime_cast into several files so clients can selectively include only what they use.
Add support for shared_ptrs.
2016-08-09 14:51:36 -04:00
Chris Glover 0b006b6af6 Remove all references to std::type_traits
Replace variadic template with boost preprocessor.
2016-08-08 12:16:58 -04:00
Chris Glover 76cae485cb Merge branch 'runtime_cast' of github.com:cdglove/type_index into runtime_cast
# Conflicts:
#	include/boost/type_index/runtime_cast.hpp
#	test/runtime_cast_test.cpp
2016-07-15 17:18:42 -04:00
Chris Glover ee7b15a493 First version.
TODO: Error messages when using mismatched types are not clear. Needs consideration.
2016-07-15 16:30:16 -04:00
Chris Glover 1dc8310826 Optimization: Don't check all bases. 2016-07-15 10:10:07 -04:00
Chris Glover b230140529 First version. 2016-07-15 08:49:54 -04:00
Antony Polukhin 31ec1d2524 Fix link in README 2016-06-05 13:02:56 +03:00
Antony Polukhin 40e9bd336a Test on same Boost branch when running Appveyor 2016-06-04 21:10:20 +03:00
Antony Polukhin 767c724983 README now shows build status on Windows platform 2016-06-04 15:59:29 +03:00
Antony Polukhin 24708cc109 One more example and integrate examples into the docs 2016-03-30 23:24:53 +03:00
Antony Polukhin 57205874ae Added namespace detection example 2016-03-30 22:28:53 +03:00
Antony Polukhin 1b4a85764f Fixing test under Windows 2016-03-29 23:16:17 +03:00
Antony Polukhin 1976355e8f appveyor update 1 2016-03-29 22:36:12 +03:00