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

fix ctti_type_index for GCC 7 #16

Merged
merged 1 commit into from
Jul 29, 2017
Merged

fix ctti_type_index for GCC 7 #16

merged 1 commit into from
Jul 29, 2017

Conversation

bebuch
Copy link

@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';
}

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 __PRETTY_FUNCTION__ is slightly different in GCC 7 fix ctti_type_index for GCC 7 Jul 28, 2017
@apolukhin apolukhin merged commit baa5019 into boostorg:develop Jul 29, 2017
@apolukhin
Copy link
Member

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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants