brintos

brintos / llvm-project-archived public Read only

0
0
Text · 973 B · b9c206e Raw
36 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// type_traits10 11// lvalue_ref12 13#include <type_traits>14 15#include "test_macros.h"16 17template <class T>18void test_lvalue_ref()19{20    static_assert( std::is_reference<T>::value, "");21    static_assert(!std::is_arithmetic<T>::value, "");22    static_assert(!std::is_fundamental<T>::value, "");23    static_assert(!std::is_object<T>::value, "");24    static_assert(!std::is_scalar<T>::value, "");25    static_assert( std::is_compound<T>::value, "");26    static_assert(!std::is_member_pointer<T>::value, "");27}28 29int main(int, char**)30{31    test_lvalue_ref<int&>();32    test_lvalue_ref<const int&>();33 34  return 0;35}36