Compiling with non-std C++ extensions might complain
Compiling with non-std C++ extensions might complain

Compiling with non-standard C++ extensions might complain.

Context Line nos. are 731-734 of file: folly/folly/io/async/AsyncServerSocket.cpp

We seems to be reliable upon non-standard C++ extensions

to get std::max's work done here.

Because of this reliability, we seems to be hard coding the type of first parameter

to std::max by mentioning it as int64_t(0). 

We can ask the compiler about the appropriate type of that parameter, and

same with the type of the variable, timeSinceLastAccept,  we put std::max's result in.

If we depend on the standard c++ we can root out the following error.

-----------
CC=clang CXX=clang++ LDFLAGS=-L/usr/lib/x86_64-linux-gnu/ LIBS=-lc++
CPPFLAGS=-I/usr/include/c++/v1/ CXXFLAGS=-std=c++11  ./configure
======================
make  all-recursive
make[1]: Entering directory `/home/fooldo/cppfool/temp/folly-0.27.0/folly'
Making all in .
make[2]: Entering directory `/home/fooldo/cppfool/temp/folly-0.27.0/folly'
depbase=`echo io/async/AsyncServerSocket.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/bash ./libtool  --tag=CXX   --mode=compile clang++ -DHAVE_CONFIG_H   -I./.. -pthread 
-I/usr/include -I/usr/include/c++/v1/  -std=gnu++0x -std=c++11 -MT io/async/AsyncServerSocket.lo 
-MD -MP -MF $depbase.Tpo -c -o io/async/AsyncServerSocket.lo io/async/AsyncServerSocket.cpp &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  clang++ -DHAVE_CONFIG_H -I./.. -pthread -I/usr/include -I/usr/include/c++/v1/ 
-std=gnu++0x -std=c++11 -MT io/async/AsyncServerSocket.lo -MD -MP -MF io/async/.deps/AsyncServerSocket.Tpo 
-c io/async/AsyncServerSocket.cpp  -fPIC -DPIC -o io/async/.libs/AsyncServerSocket.o
io/async/AsyncServerSocket.cpp:731:35: error: no matching function for call to 'max'
    int64_t timeSinceLastAccept = std::max(
                                  ^~~~~~~~
/usr/include/c++/v1/algorithm:2652:1: note: candidate template ignored: deduced conflicting types for
      parameter '_Tp' ('long' vs. 'long long')
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/v1/algorithm:2662:1: note: candidate template ignored: could not match
      'initializer_list<type-parameter-0-0>' against 'long'
max(initializer_list<_Tp> __t, _Compare __comp)
^
/usr/include/c++/v1/algorithm:2644:1: note: candidate function template not viable: requires 3
      arguments, but 2 were provided
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/v1/algorithm:2670:1: note: candidate function template not viable: requires single
      argument '__t', but 2 arguments were provided
max(initializer_list<_Tp> __t)
^
1 error generated.
make[2]: *** [io/async/AsyncServerSocket.lo] Error 1
make[2]: Leaving directory `/home/fooldo/cppfool/temp/folly-0.27.0/folly'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/fooldo/cppfool/temp/folly-0.27.0/folly'
make: *** [all] Error 2

=========
-----------------------
cppfool/folly,cppfool/folly,cppfool/folly,cppfool/folly,cppfool/folly