Marshall Clow | f60d092 | 2015-11-17 00:08:08 +0000 | [diff] [blame] | 1 | //===----------------------------------------------------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | // UNSUPPORTED: c++98, c++03, c++11, c++14 |
| 11 | |
| 12 | // template <class T> constexpr add_const<T>& as_const(T& t) noexcept; // C++17 |
| 13 | // template <class T> add_const<T>& as_const(const T&&) = delete; // C++17 |
| 14 | |
| 15 | #include <utility> |
| 16 | |
| 17 | struct S {int i;}; |
| 18 | |
| 19 | int main() |
| 20 | { |
| 21 | std::as_const(S{}); |
| 22 | } |