-
Notifications
You must be signed in to change notification settings - Fork 396
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
linq.hpp not compiling in macOS #390
Comments
Thanks! Have you looked at range-v3? This is going to be the official approach in C++ for linq. This appears to be a repeated pattern in the code that is not standards compliant. For instance typename Result = std::result_of<Selector(typename element_type)>::type should be typename Result = typename std::result_of<Selector(typename element_type)>::type someone would need to take a pass over the source making these simple changes. PR's are welcome! I do not have linq included in the CI for this project. That would make it much more likely to compile :) |
Hi, Ivan. |
made some quick changes, submitting a PR now. |
Hi
In a simple source file like this:
#include <cpplinq/linq.hpp>
using namespace cpplinq;
// no more code...
===========================
I get the following errors:
===========================
In file included from project/dashlitics_service.cpp:27:
linq.hpp:474:39: error: expected a qualified name after 'typename'
template
^
linq.hpp:480:14: error: expected a qualified name after 'typename'
typename element_type sum(typename element_type seed) const {
^
linq.hpp:480:40: error: expected a qualified name after 'typename'
typename element_type sum(typename element_type seed) const {
^
linq.hpp:484:85: error: expected a qualified name after 'typename'
template <typename Selector, typename Result = std::result_of<Selector(typename element_type)>::type>
^
linq.hpp:484:85: error: expected a qualified name after 'typename'
linq.hpp:484:52: error: missing 'typename' prior to dependent type name 'std::result_of<Selector (element_type)>::type'
template <typename Selector, typename Result = std::result_of<Selector(typename element_type)>::type>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typename
linq.hpp:489:85: error: expected a qualified name after 'typename'
template <typename Selector, typename Result = std::result_of<Selector(typename element_type)>::type>
^
linq.hpp:489:85: error: expected a qualified name after 'typename'
linq.hpp:489:52: error: missing 'typename' prior to dependent type name 'std::result_of<Selector (element_type)>::type'
template <typename Selector, typename Result = std::result_of<Selector(typename element_type)>::type>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
typename
9 errors generated.
========================
using macOS Sierra 10.12.5 with Xcode Version 8.3.3 (8E3004b):
$ clang --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Awesome library, I am looking forward to use it, so if there are any clues you can provide to me, those will be greatly appreciated!
Ivan.
The text was updated successfully, but these errors were encountered: