Skip to content

Instantly share code, notes, and snippets.

#include <atomic>
#include <chrono>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <ios>
#include "Log.h"
namespace Aux { namespace Log {
@Fiona-J-W
Fiona-J-W / main.cpp
Created February 9, 2014 21:24
converting-variadics-wrapper
#include <cstdio> // printf
struct mytype {
int value;
operator int() const {return value;}
};
template<typename T> struct argument_type_helper{using type = T;};
template<> struct argument_type_helper<mytype>{using type = int;};
[Trace( 100)][“/home/florian/Studium/PSE/code/src/gui/filter_call_tab.cpp”, 111: static void cvv::gui::FilterCallTab::addFilterViewToMap(const QString &, std::function<std::unique_ptr<cvv::view::FilterView> (const std::vector<cv::Mat> &, QWidget *)>)]: tracepoint
[Trace( 100)][“/home/florian/Studium/PSE/code/src/gui/../qtutil/registerhelper.hpp”, 107: static bool cvv::qtutil::RegisterHelper<cvv::view::FilterView, const std::__debug::vector<cv::Mat, std::allocator<cv::Mat> > &, QWidget *>::registerElement(const QString &, const std::function<std::unique_ptr<Value> (Args...)> &) [Value = cvv::view::FilterView, Args = <const std::__debug::vector<cv::Mat, std::allocator<cv::Mat> > &, QWidget *>]]: tracepoint
[Trace( 100)][“/home/florian/Studium/PSE/code/src/gui/../qtutil/registerhelper.hpp”, 77: static bool cvv::qtutil::RegisterHelper<cvv::view::FilterView, const std::__debug::vector<cv::Mat, std::allocator<cv::Mat> > &, QWidget *>::has(const QString &) [Value = cvv::view::FilterView, Args = <const std::__debug::
#include <string>
#include <iostream>
int main() {
using std::string;
std::string umlauts_small = u8"äöü";
std::string umlauts_capital = u8"ÄÖÜ";
auto foo = umlauts_small + "|" + umlauts_capital;
@Fiona-J-W
Fiona-J-W / gist:9195261
Created February 24, 2014 19:30
mfc.conf
set cpp {
compiler-opts= -Wall -Wextra -pedantic -std=c++11
}
set release {
compiler-opts=-O3 -mtune=native -Werror
}
set debug {
@Fiona-J-W
Fiona-J-W / gist:9355664
Created March 4, 2014 21:08
Errors when building cvvisual with Qt4
[ 1%] Automoc for target UnitTests
[ 1%] Built target UnitTests_automoc
[ 1%] Automoc for target cvvisual
[ 1%] Built target cvvisual_automoc
[ 2%] Building CXX object CMakeFiles/cvvisual.dir/src/qtutil/zoomableimage.cpp.o
In file included from /usr/include/qt4/QtGui/qscrollbar.h:46:0,
from /usr/include/qt4/QtGui/QScrollBar:1,
from /home/florian/Studium/PSE/code/src/qtutil/zoomableimage.cpp:6:
/usr/include/qt4/QtGui/qabstractslider.h: In constructor 'cvv::qtutil::ZoomableImage::ZoomableImage(const cv::Mat&, QWidget*)':
/usr/include/qt4/QtGui/qabstractslider.h:126:10: error: 'void QAbstractSlider::valueChanged(int)' is protected
#0 QObject::startTimer(int, Qt::TimerType)() at :0
#1 QTimer::start()() at :0
#2 cvv::qtutil::ZoomableImage::queueUpdateArea(this = 0x3c6b220) at /home/florian/Studium/PSE/code/src/qtutil/zoomableimage.cpp:262
#3 cvv::qtutil::ZoomableImage::viewScrolled(this = 0x3c6b220) at /home/florian/Studium/PSE/code/build/debug/../../src/gui/../view/../qtutil/zoomableimage.hpp:356
#4 QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (cvv::qtutil::ZoomableImage::*)()>::call(void (cvv::qtutil::ZoomableImage::*)(), cvv::qtutil::ZoomableImage*, void**)(f = (void (cvv::qtutil::ZoomableImage::*)(cvv::qtutil::ZoomableImage * const)) 0x68b482 <cvv::qtutil::ZoomableImage::viewScrolled()>, o = 0x3c6b220, arg = 0x7fffd4d64aa0) at /usr/include/qt/QtCore/qobjectdefs_impl.h:508
#5 QtPrivate::FunctionPointer<void (cvv::qtutil::ZoomableImage::*)()>::call<QtPrivate::List<>, void>(void (cvv::qtutil::ZoomableImage::*)(), cvv::qtutil::ZoomableImage*, void**)(f = (void (cvv::qtutil::ZoomableImage::*)(cvv::q
#0 QWidget::setParent(QWidget*)() at :0
#1 cvv::qtutil::Accordion::clear()() at :0
#2 cvv::gui::OverviewTable::updateRowGroups(std::vector<cvv::stfl::ElementGroup<cvv::gui::OverviewTableRow>, std::allocator<cvv::stfl::ElementGroup<cvv::gui::OverviewTableRow> > >)() at :0
#3 cvv::gui::OverviewPanel::filterQuery(QString)() at :0
#4 cvv::gui::OverviewPanel::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)() at :0
#5 QMetaObject::activate(QObject*, int, int, void**)() at :0
#6 cvv::qtutil::STFLQueryWidget::filterSignal(QString)() at :0
#7 cvv::qtutil::STFLQueryWidget::returnPressed()() at :0
#8 cvv::qtutil::STFLQueryWidget::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)() at :0
#9 QMetaObject::activate(QObject*, int, int, void**)() at :0
#0 cvv::qtutil::MatchManagement::applySelection()() at :0
#1 QMetaObject::activate(QObject*, int, int, void**)() at :0
#2 QMetaObject::activate(QObject*, int, int, void**)() at :0
#3 QMetaObject::activate(QObject*, int, int, void**)() at :0
#4 QMetaObject::activate(QObject*, int, int, void**)() at :0
#5 QDoubleSpinBox::valueChanged(double)() at :0
#6 ??() at :0
#7 ??() at :0
#8 ??() at :0
#9 QMetaObject::activate(QObject*, int, int, void**)() at :0
#include <iostream>
#include <type_traits>
template<typename...T> struct foo{};
template<template<typename...> class Template, typename Type>
struct is_instantiation_of: std::false_type {};
template<template<typename...> class Template, typename...Arguments>