Implement n3789; constexpr support in named function objects
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@191626 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -27,5 +27,11 @@ int main()
|
||||
assert(f2(36, 4) == 9);
|
||||
assert(f2(36.0, 4) == 9);
|
||||
assert(f2(18, 4.0) == 4.5); // exact in binary
|
||||
|
||||
constexpr int foo = std::divides<int> () (3, 2);
|
||||
static_assert ( foo == 1, "" );
|
||||
|
||||
constexpr int bar = std::divides<> () (3.0, 2);
|
||||
static_assert ( bar == 1, "" );
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user