Commit 05a06785 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Fix MSVC conversion warning in Optional test

Summary:
[Folly] Fix MSVC conversion warning in `Optional` test.

```
folly\optional.h(372): warning C4244: 'argument': conversion from 'double' to 'int', possible loss of data
folly\optional.h(358): note: see reference to function template instantiation 'void folly::Optional<Type>::construct<std::initializer_list<_Ty>&,double>(std::initializer_list<_Ty> &,double &&)' being compiled
          with
          [
              _Ty=int
          ]
folly\optional.h(359): note: see reference to function template instantiation 'void folly::Optional<Type>::construct<std::initializer_list<_Ty>&,double>(std::initializer_list<_Ty> &,double &&)' being compiled
          with
          [
              _Ty=int
          ]
folly\optional.h(449): note: see reference to function template instantiation 'folly::Optional<Type>::Optional<std::initializer_list<_Ty>&,double>(folly::Optional<Type>::PrivateConstructor,std::initializer_list<_Ty> &,double &&) noexcept' being compiled
          with
          [
              _Ty=int
          ]
folly\optional.h(451): note: see reference to function template instantiation 'folly::Optional<Type>::Optional<std::initializer_list<_Ty>&,double>(folly::Optional<Type>::PrivateConstructor,std::initializer_list<_Ty> &,double &&) noexcept' being compiled
          with
          [
              _Ty=int
          ]
folly\test\optionaltest.cpp(659): note: see reference to function template instantiation 'folly::Optional<Type> folly::make_optional<Type,int,double>(std::initializer_list<_Ty>,double &&)' being compiled
          with
          [
              _Ty=int
          ]
```

Reviewed By: Orvid

Differential Revision: D16889085

fbshipit-source-id: c59f5e3fa0d4402e1b836841dff66d73b111235f
parent 240c1593
...@@ -600,8 +600,9 @@ class ConstructibleWithArgsOnly { ...@@ -600,8 +600,9 @@ class ConstructibleWithArgsOnly {
class ConstructibleWithInitializerListAndArgsOnly { class ConstructibleWithInitializerListAndArgsOnly {
public: public:
ConstructibleWithInitializerListAndArgsOnly(std::initializer_list<int>, int) { ConstructibleWithInitializerListAndArgsOnly(
} std::initializer_list<int>,
double) {}
ConstructibleWithInitializerListAndArgsOnly() = delete; ConstructibleWithInitializerListAndArgsOnly() = delete;
ConstructibleWithInitializerListAndArgsOnly( ConstructibleWithInitializerListAndArgsOnly(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment