-
Notifications
You must be signed in to change notification settings - Fork 73
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
Compilation issue #20
Comments
The same to me. It appeared in VC14. |
I had the same problem and resolved it like this: diff --git a/prettyprint.hpp b/prettyprint.hpp
index 6bf2543..f75683c 100644
--- a/prettyprint.hpp
+++ b/prettyprint.hpp
@@ -157,7 +157,7 @@ namespace pretty_print
template <typename T1, typename T2>
struct print_container_helper<T, TChar, TCharTraits, TDelimiters>::printer<std::pair<T1, T2>>
{
- using ostream_type = print_container_helper<T, TChar, TCharTraits, TDelimiters>::ostream_type;
+ using ostream_type = typename print_container_helper<T, TChar, TCharTraits, TDelimiters>::ostream_type;
static void print_body(const std::pair<T1, T2> & c, ostream_type & stream)
{
@@ -174,7 +174,7 @@ namespace pretty_print
template <typename ...Args>
struct print_container_helper<T, TChar, TCharTraits, TDelimiters>::printer<std::tuple<Args...>>
{
- using ostream_type = print_container_helper<T, TChar, TCharTraits, TDelimiters>::ostream_type;
+ using ostream_type = typename print_container_helper<T, TChar, TCharTraits, TDelimiters>::ostream_type;
using element_type = std::tuple<Args...>;
template <std::size_t I> struct Int { };
|
Closed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get the following issue while trying to use the pretty print without modifications (I just renamed the file)
1>c:\main\dlmu\albfd\include\util\utlprettyprint.hpp(160): error C2061: syntax error: identifier 'ostream_type'
1> c:\main\dlmu\albfd\include\util\utlprettyprint.hpp(169): note: see reference to class template instantiation 'pretty_print::print_container_helper<T,TChar,TCharTraits,TDelimiters>::printerstd::pair<_Other1,_Other2>' being compiled
1>c:\main\dlmu\albfd\include\util\utlprettyprint.hpp(160): error C2238: unexpected token(s) preceding ';'
1>c:\main\dlmu\albfd\include\util\utlprettyprint.hpp(177): error C2061: syntax error: identifier 'ostream_type'
1> c:\main\dlmu\albfd\include\util\utlprettyprint.hpp(208): note: see reference to class template instantiation 'pretty_print::print_container_helper<T,TChar,TCharTraits,TDelimiters>::printerstd::tuple<_Types1...>' being compiled
1>c:\main\dlmu\albfd\include\util\utlprettyprint.hpp(177): error C2238: unexpected token(s) preceding ';'
The text was updated successfully, but these errors were encountered: