Skip to content

Example code doesn't compile with VS2017 #1

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

Open
BrodyHiggerson opened this issue Dec 19, 2017 · 1 comment
Open

Example code doesn't compile with VS2017 #1

BrodyHiggerson opened this issue Dec 19, 2017 · 1 comment

Comments

@BrodyHiggerson
Copy link

BrodyHiggerson commented Dec 19, 2017

I just tried the basic example in a fresh C++ project in VS2017 on Windows and received the following:

1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2065: 'not': undeclared identifier
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2059: syntax error: ''
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2143: syntax error: missing ';' before '{'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2143: syntax error: missing ')' before ';'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2143: syntax error: missing '>' before ';'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2976: 'std::enable_if': too few template arguments
1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.11.25503\include\xtr1common(52): note: see declaration of 'std::enable_if'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2993: 'std::enable_if': illegal type for non-type template parameter '__formal'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2988: unrecognizable template declaration/definition
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2059: syntax error: ''
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2447: '{': missing function header (old-style formal list?)
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2065: 'T': undeclared identifier
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2923: 'std::is_convertible': 'T' is not a valid template type argument for parameter '_From'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2143: syntax error: missing ';' before 'std::is_convertible'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2059: syntax error: ')'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(225): error C2039: 'type': is not a member of 'global namespace'' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(227): error C2143: syntax error: missing ';' before '{' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(227): error C2447: '{': missing function header (old-style formal list?) 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2146: syntax error: missing ')' before identifier 'and' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2143: syntax error: missing ';' before '{' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2143: syntax error: missing ')' before ';' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2143: syntax error: missing '>' before ';' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2976: 'std::enable_if': too few template arguments 1>c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.11.25503\include\xtr1common(52): note: see declaration of 'std::enable_if' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2993: 'std::enable_if': illegal type for non-type template parameter '__formal' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2988: unrecognizable template declaration/definition 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2059: syntax error: '<end Parse>' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2447: '{': missing function header (old-style formal list?) 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2059: syntax error: ')' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2059: syntax error: ',' 1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(231): error C2039: 'type': is not a member of 'global namespace''
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(233): error C2143: syntax error: missing ';' before '{'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(233): error C2447: '{': missing function header (old-style formal list?)
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(268): error C2146: syntax error: missing ')' before identifier 'and'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(268): error C2993: 'std::string': illegal type for non-type template parameter '_Test'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(306): error C2955: 'args::argument_type': use of class template requires template argument list
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(243): note: see declaration of 'args::argument_type'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(306): error C2027: use of undefined type 'args::argument_type'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(243): note: see declaration of 'args::argument_type'
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(306): error C2065: 'none': undeclared identifier
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(315): error C2065: 'not': undeclared identifier
1>c:\users\brody\documents\visual studio 2017\projects\templatetests\templatetests\args.hpp(315): error C2146: syntax error: missing ';' before identifier 'eager_callbacks'

It's a shame because this looks nice and simple!

@pfultz2
Copy link
Owner

pfultz2 commented Dec 26, 2017

I think this might be an easy fix by adding an include for iso646.h header.

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

No branches or pull requests

2 participants