Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 5 years ago

Language

C++

Compiler

gcc HEAD 10.0.1 20200317 (experimental)

Options
Warnings
Optimization
Boost 1.64.0
C++2a(GNU)
no pedantic
Raw compiler options
-O2

Author

anonymous

about 5 years ago

$ g++ prog.cc -Wall -Wextra -O2 -march=native -I/opt/wandbox/boost-1.64.0/gcc-head/include -std=gnu++2a -O2
prog.cc: In instantiation of 'class Incompilable<type_entier_requis>':
prog.cc:11:10:   required from 'class Entier<std::__cxx11::basic_string<char> >'
prog.cc:39:19:   required from here
prog.cc:7:22: error: static assertion failed
    7 |        static_assert(bloquer_la_compilation<Raison>());
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
prog.cc: In function 'int main()':
prog.cc:40:15: error: no match for 'operator%' (operand types are 'Entier<std::__cxx11::basic_string<char> >' and 'int')
   40 |    cout << es % 2 << endl;
      |            ~~ ^ ~
      |            |    |
      |            |    int
      |            Entier<std::__cxx11::basic_string<char> >
prog.cc:26:24: note: candidate: 'constexpr Entier<T> Entier<T>::operator%(const Entier<T>&) const [with T = std::__cxx11::basic_string<char>]'
   26 |       constexpr Entier operator%(const Entier &diviseur) const {
      |                        ^~~~~~~~
prog.cc:26:48: note:   no known conversion for argument 1 from 'int' to 'const Entier<std::__cxx11::basic_string<char> >&'
   26 |       constexpr Entier operator%(const Entier &diviseur) const {
      |                                  ~~~~~~~~~~~~~~^~~~~~~~
Exit Code:
1