Language
C++
Compiler
gcc 7.2.0
Options
Warnings
Boost 1.65.1
C++1z(GNU)
no pedantic
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.65.1/gcc-7.2.0/include -std=gnu++1z
prog.cc: In function 'int main(int, char**)':
prog.cc:42:43: error: no matching function for call to 'MatrixDistGen<HostMem<double> >::MatrixDistGen(my_allocator<double>&)'
MatrixDistGen<HostMem<T>> b(allocator2);
^
prog.cc:30:3: note: candidate: template<template<class> class Allocator> MatrixDistGen<Mem>::MatrixDistGen(Allocator<typename Mem::ElementType>&)
MatrixDistGen(Allocator<T> &) {}
^~~~~~~~~~~~~
prog.cc:30:3: note: template argument deduction/substitution failed:
prog.cc:42:43: note: 'my_allocator<double> {aka special_allocator<double, 42>}' is not derived from 'Allocator<HostMem<double>::ElementType>'
MatrixDistGen<HostMem<T>> b(allocator2);
^
prog.cc:25:7: note: candidate: constexpr MatrixDistGen<HostMem<double> >::MatrixDistGen(const MatrixDistGen<HostMem<double> >&)
class MatrixDistGen
^~~~~~~~~~~~~
prog.cc:25:7: note: no known conversion for argument 1 from 'my_allocator<double> {aka special_allocator<double, 42>}' to 'const MatrixDistGen<HostMem<double> >&'
prog.cc:25:7: note: candidate: constexpr MatrixDistGen<HostMem<double> >::MatrixDistGen(MatrixDistGen<HostMem<double> >&&)
prog.cc:25:7: note: no known conversion for argument 1 from 'my_allocator<double> {aka special_allocator<double, 42>}' to 'MatrixDistGen<HostMem<double> >&&'
Exit Code:
1