@@ -1287,20 +1287,26 @@ BOOST_FORCEINLINE bool operator==(path const& lhs, path const& rhs)
1287
1287
return lhs.compare (rhs) == 0 ;
1288
1288
}
1289
1289
1290
- template < typename Source >
1290
+ template < typename Path, typename Source >
1291
1291
BOOST_FORCEINLINE typename boost::enable_if_c<
1292
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1292
+ boost::conjunction<
1293
+ boost::is_same< Path, path >,
1294
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1295
+ >::value,
1293
1296
bool
1294
- >::type operator ==(path const & lhs, Source const & rhs)
1297
+ >::type operator ==(Path const & lhs, Source const & rhs)
1295
1298
{
1296
1299
return lhs.compare (rhs) == 0 ;
1297
1300
}
1298
1301
1299
- template < typename Source >
1302
+ template < typename Source, typename Path >
1300
1303
BOOST_FORCEINLINE typename boost::enable_if_c<
1301
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1304
+ boost::conjunction<
1305
+ boost::is_same< Path, path >,
1306
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1307
+ >::value,
1302
1308
bool
1303
- >::type operator ==(Source const & lhs, path const & rhs)
1309
+ >::type operator ==(Source const & lhs, Path const & rhs)
1304
1310
{
1305
1311
return rhs.compare (lhs) == 0 ;
1306
1312
}
@@ -1310,20 +1316,26 @@ BOOST_FORCEINLINE bool operator!=(path const& lhs, path const& rhs)
1310
1316
return lhs.compare (rhs) != 0 ;
1311
1317
}
1312
1318
1313
- template < typename Source >
1319
+ template < typename Path, typename Source >
1314
1320
BOOST_FORCEINLINE typename boost::enable_if_c<
1315
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1321
+ boost::conjunction<
1322
+ boost::is_same< Path, path >,
1323
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1324
+ >::value,
1316
1325
bool
1317
- >::type operator !=(path const & lhs, Source const & rhs)
1326
+ >::type operator !=(Path const & lhs, Source const & rhs)
1318
1327
{
1319
1328
return lhs.compare (rhs) != 0 ;
1320
1329
}
1321
1330
1322
- template < typename Source >
1331
+ template < typename Source, typename Path >
1323
1332
BOOST_FORCEINLINE typename boost::enable_if_c<
1324
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1333
+ boost::conjunction<
1334
+ boost::is_same< Path, path >,
1335
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1336
+ >::value,
1325
1337
bool
1326
- >::type operator !=(Source const & lhs, path const & rhs)
1338
+ >::type operator !=(Source const & lhs, Path const & rhs)
1327
1339
{
1328
1340
return rhs.compare (lhs) != 0 ;
1329
1341
}
@@ -1333,20 +1345,26 @@ BOOST_FORCEINLINE bool operator<(path const& lhs, path const& rhs)
1333
1345
return lhs.compare (rhs) < 0 ;
1334
1346
}
1335
1347
1336
- template < typename Source >
1348
+ template < typename Path, typename Source >
1337
1349
BOOST_FORCEINLINE typename boost::enable_if_c<
1338
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1350
+ boost::conjunction<
1351
+ boost::is_same< Path, path >,
1352
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1353
+ >::value,
1339
1354
bool
1340
- >::type operator <(path const & lhs, Source const & rhs)
1355
+ >::type operator <(Path const & lhs, Source const & rhs)
1341
1356
{
1342
1357
return lhs.compare (rhs) < 0 ;
1343
1358
}
1344
1359
1345
- template < typename Source >
1360
+ template < typename Source, typename Path >
1346
1361
BOOST_FORCEINLINE typename boost::enable_if_c<
1347
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1362
+ boost::conjunction<
1363
+ boost::is_same< Path, path >,
1364
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1365
+ >::value,
1348
1366
bool
1349
- >::type operator <(Source const & lhs, path const & rhs)
1367
+ >::type operator <(Source const & lhs, Path const & rhs)
1350
1368
{
1351
1369
return rhs.compare (lhs) > 0 ;
1352
1370
}
@@ -1356,20 +1374,26 @@ BOOST_FORCEINLINE bool operator<=(path const& lhs, path const& rhs)
1356
1374
return lhs.compare (rhs) <= 0 ;
1357
1375
}
1358
1376
1359
- template < typename Source >
1377
+ template < typename Path, typename Source >
1360
1378
BOOST_FORCEINLINE typename boost::enable_if_c<
1361
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1379
+ boost::conjunction<
1380
+ boost::is_same< Path, path >,
1381
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1382
+ >::value,
1362
1383
bool
1363
- >::type operator <=(path const & lhs, Source const & rhs)
1384
+ >::type operator <=(Path const & lhs, Source const & rhs)
1364
1385
{
1365
1386
return lhs.compare (rhs) <= 0 ;
1366
1387
}
1367
1388
1368
- template < typename Source >
1389
+ template < typename Source, typename Path >
1369
1390
BOOST_FORCEINLINE typename boost::enable_if_c<
1370
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1391
+ boost::conjunction<
1392
+ boost::is_same< Path, path >,
1393
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1394
+ >::value,
1371
1395
bool
1372
- >::type operator <=(Source const & lhs, path const & rhs)
1396
+ >::type operator <=(Source const & lhs, Path const & rhs)
1373
1397
{
1374
1398
return rhs.compare (lhs) >= 0 ;
1375
1399
}
@@ -1379,20 +1403,26 @@ BOOST_FORCEINLINE bool operator>(path const& lhs, path const& rhs)
1379
1403
return lhs.compare (rhs) > 0 ;
1380
1404
}
1381
1405
1382
- template < typename Source >
1406
+ template < typename Path, typename Source >
1383
1407
BOOST_FORCEINLINE typename boost::enable_if_c<
1384
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1408
+ boost::conjunction<
1409
+ boost::is_same< Path, path >,
1410
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1411
+ >::value,
1385
1412
bool
1386
- >::type operator >(path const & lhs, Source const & rhs)
1413
+ >::type operator >(Path const & lhs, Source const & rhs)
1387
1414
{
1388
1415
return lhs.compare (rhs) > 0 ;
1389
1416
}
1390
1417
1391
- template < typename Source >
1418
+ template < typename Source, typename Path >
1392
1419
BOOST_FORCEINLINE typename boost::enable_if_c<
1393
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1420
+ boost::conjunction<
1421
+ boost::is_same< Path, path >,
1422
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1423
+ >::value,
1394
1424
bool
1395
- >::type operator >(Source const & lhs, path const & rhs)
1425
+ >::type operator >(Source const & lhs, Path const & rhs)
1396
1426
{
1397
1427
return rhs.compare (lhs) < 0 ;
1398
1428
}
@@ -1402,35 +1432,41 @@ BOOST_FORCEINLINE bool operator>=(path const& lhs, path const& rhs)
1402
1432
return lhs.compare (rhs) >= 0 ;
1403
1433
}
1404
1434
1405
- template < typename Source >
1435
+ template < typename Path, typename Source >
1406
1436
BOOST_FORCEINLINE typename boost::enable_if_c<
1407
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1437
+ boost::conjunction<
1438
+ boost::is_same< Path, path >,
1439
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1440
+ >::value,
1408
1441
bool
1409
- >::type operator >=(path const & lhs, Source const & rhs)
1442
+ >::type operator >=(Path const & lhs, Source const & rhs)
1410
1443
{
1411
1444
return lhs.compare (rhs) >= 0 ;
1412
1445
}
1413
1446
1414
- template < typename Source >
1447
+ template < typename Source, typename Path >
1415
1448
BOOST_FORCEINLINE typename boost::enable_if_c<
1416
- detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >::value,
1449
+ boost::conjunction<
1450
+ boost::is_same< Path, path >,
1451
+ detail::path_traits::is_convertible_to_path_source< typename boost::remove_cv< Source >::type >
1452
+ >::value,
1417
1453
bool
1418
- >::type operator >=(Source const & lhs, path const & rhs)
1454
+ >::type operator >=(Source const & lhs, Path const & rhs)
1419
1455
{
1420
1456
return rhs.compare (lhs) <= 0 ;
1421
1457
}
1422
1458
1423
1459
1424
1460
// Note: Declared as a template to delay binding to Boost.ContainerHash functions and make the dependency optional
1425
- template < typename T >
1461
+ template < typename Path >
1426
1462
inline typename boost::enable_if_c<
1427
- boost::is_same< T , path >::value,
1463
+ boost::is_same< Path , path >::value,
1428
1464
std::size_t
1429
- >::type hash_value (T const & p) BOOST_NOEXCEPT
1465
+ >::type hash_value (Path const & p) BOOST_NOEXCEPT
1430
1466
{
1431
1467
#ifdef BOOST_WINDOWS_API
1432
1468
std::size_t seed = 0u ;
1433
- for (typename T ::value_type const * it = p.c_str (); *it; ++it)
1469
+ for (typename Path ::value_type const * it = p.c_str (); *it; ++it)
1434
1470
hash_combine (seed, *it == L' /' ? L' \\ ' : *it);
1435
1471
return seed;
1436
1472
#else // BOOST_POSIX_API
0 commit comments