Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

Compiler

Options

$
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