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

fix ctti_type_index for GCC 7 #16

Merged
merged 1 commit into from Jul 29, 2017

Conversation

Projects
None yet
2 participants
@bebuch

bebuch commented Jul 28, 2017

__PRETTY_FUNCTION__ is slightly different in GCC 7.

The output of an unsigned int literal doesn'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';
}
__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';
	}

@bebuch bebuch changed the title from __PRETTY_FUNCTION__ is slightly different in GCC 7 to fix ctti_type_index for GCC 7 Jul 28, 2017

@apolukhin apolukhin merged commit baa5019 into boostorg:develop Jul 29, 2017

@apolukhin

This comment has been minimized.

Show comment
Hide comment
@apolukhin

apolukhin Jul 29, 2017

Member

Thanks for the awesome patch!

Hopefully this fix will appear in Boost 1.65

Member

apolukhin commented Jul 29, 2017

Thanks for the awesome patch!

Hopefully this fix will appear in Boost 1.65

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment