Skip to content

Instantly share code, notes, and snippets.

Tristan Brindle tcbrindle

View GitHub Profile
View make_vector.hpp
// make_vector.hpp
//
// Copyright (c) 2019 Tristan Brindle (tcbrindle at gmail dot com)
// Distributed under the Boost Software License, Version 1.0. (See
// http://www.boost.org/LICENSE_1_0.txt)
#include <type_traits>
#include <vector>
namespace tcb {
@tcbrindle
tcbrindle / clang-error.txt
Created May 31, 2018
Clang 6 sort(list.begin(), list.end()) error messages
View clang-error.txt
In file included from example.cpp:2:
In file included from /usr/local/Cellar/llvm/6.0.0/include/c++/v1/list:177:
/usr/local/Cellar/llvm/6.0.0/include/c++/v1/algorithm:4008:40: error: invalid operands to binary expression ('std::__1::__list_iterator<int, void *>' and 'std::__1::__list_iterator<int, void *>')
difference_type __len = __last - __first;
~~~~~~ ^ ~~~~~~~
/usr/local/Cellar/llvm/6.0.0/include/c++/v1/algorithm:4201:5: note: in instantiation of function template specialization 'std::__1::__sort<std::__1::__less<int, int> &, std::__1::__list_iterator<int, void *> >' requested here
__sort<_Comp_ref>(__first, __last, __comp);
^
/usr/local/Cellar/llvm/6.0.0/include/c++/v1/algorithm:4210:12: note: in instantiation of function template specialization 'std::__1::sort<std::__1::__list_iterator<int, void *>, std::__1::__less<int, int> >' requested here
_VSTD::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
View Tokenizer_Comparison.cpp
#include <chrono>
#include <cstring>
#include <string>
#include <fstream>
#include <istream>
#include <iostream>
#include <sstream>
#include <boost/tokenizer.hpp>
You can’t perform that action at this time.