Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 8 years ago

Language

Compiler

Options

Author

anonymous

over 8 years ago

$
prog.cc:32:5: warning: conversion function converting 'context_vector<float, context::world>' to itself will never be used
    operator context_vector<T, world>() const { return { x / 2.f, y / 2.f }; }
    ^
prog.cc:50:25: note: in instantiation of template class 'context_vector<float, context::world>' requested here
void fw(Vector2w<float> v){ std::cout << v.x << ' ' << v.y << '\n'; }
                        ^
prog.cc:34:5: warning: conversion function converting 'context_vector<float, context::screen>' to itself will never be used
    operator context_vector<T, screen>() const { return { x * 2.f, y * 2.f }; }
    ^
prog.cc:51:25: note: in instantiation of template class 'context_vector<float, context::screen>' requested here
void fs(Vector2s<float> v){ std::cout << v.x << ' ' << v.y << '\n'; }
                        ^
prog.cc:58:5: error: no matching function for call to 'fs'
    fs(w);
    ^~
prog.cc:51:6: note: candidate function not viable: no known conversion from 'context_vector<[...], context::world aka 0>' to 'context_vector<[...], context::screen aka 1>' for 1st argument
void fs(Vector2s<float> v){ std::cout << v.x << ' ' << v.y << '\n'; }
     ^
prog.cc:59:5: error: no matching function for call to 'fw'
    fw(s);
    ^~
prog.cc:50:6: note: candidate function not viable: no known conversion from 'context_vector<[...], context::screen aka 1>' to 'context_vector<[...], context::world aka 0>' for 1st argument
void fw(Vector2w<float> v){ std::cout << v.x << ' ' << v.y << '\n'; }
     ^
2 warnings and 2 errors generated.
Exit Code:
1