Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 5 years ago

Language

C++

Compiler

gcc 10.1.0

Options
Warnings
Boost 1.73.0
C++2a(GNU)
no pedantic

Author

anonymous

almost 5 years ago

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.73.0/gcc-10.1.0/include -std=gnu++2a
prog.cc: In function 'int main()':
prog.cc:28:25: error: use of function 'void f(T&&) [with T = dereferencable_l]' with unsatisfied constraints
   28 |   f(dereferencable_l{20});  // 右辺値を渡す、エラー
      |                         ^
prog.cc:9:6: note: declared here
    9 | void f(T&& t) {
      |      ^
prog.cc:9:6: note: constraints not satisfied
prog.cc: In instantiation of 'void f(T&&) [with T = dereferencable_l]':
prog.cc:28:25:   required from here
prog.cc:4:9:   required for the satisfaction of 'weakly_indirectly_readable<T>' [with T = dereferencable_l]
prog.cc:4:38:   in requirements with 'T&& t' [with T = dereferencable_l]
prog.cc:5:3: note: the required expression '* forward<T>(t)' is invalid
    5 |   *std::forward<T>(t);
      |   ^~~~~~~~~~~~~~~~~~~
cc1plus: note: set '-fconcepts-diagnostics-depth=' to at least 2 for more detail
Exit Code:
1